mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
refactor(dir): ♻ re-gen Initial migration
This commit is contained in:
parent
2965533102
commit
f9d8319a9e
5 changed files with 205 additions and 254189 deletions
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -11,7 +11,7 @@
|
|||
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
|
||||
{
|
||||
[DbContext(typeof(QueryDbContext))]
|
||||
[Migration("20211122224814_Initial")]
|
||||
[Migration("20211126172625_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
|
|
@ -25,12 +25,12 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Dependent", b =>
|
||||
{
|
||||
b.Property<int>("DependencyFilterListId")
|
||||
.HasColumnType("integer")
|
||||
b.Property<long>("DependencyFilterListId")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("dependency_filter_list_id");
|
||||
|
||||
b.Property<int>("DependentFilterListId")
|
||||
.HasColumnType("integer")
|
||||
b.Property<long>("DependentFilterListId")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("dependent_filter_list_id");
|
||||
|
||||
b.HasKey("DependencyFilterListId", "DependentFilterListId")
|
||||
|
|
@ -44,12 +44,12 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||||
|
||||
b.Property<string>("ChatUrl")
|
||||
.HasColumnType("text")
|
||||
|
|
@ -83,10 +83,10 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
.HasColumnType("text")
|
||||
.HasColumnName("issues_url");
|
||||
|
||||
b.Property<int>("LicenseId")
|
||||
b.Property<long>("LicenseId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasDefaultValue(5)
|
||||
.HasColumnType("bigint")
|
||||
.HasDefaultValue(5L)
|
||||
.HasColumnName("license_id");
|
||||
|
||||
b.Property<string>("Name")
|
||||
|
|
@ -121,31 +121,31 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListLanguage", b =>
|
||||
{
|
||||
b.Property<int>("FilterListId")
|
||||
.HasColumnType("integer")
|
||||
b.Property<long>("FilterListId")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("filter_list_id");
|
||||
|
||||
b.Property<string>("Iso6391")
|
||||
.HasColumnType("character(2)")
|
||||
.HasColumnName("iso6391");
|
||||
b.Property<long>("LanguageId")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("language_id");
|
||||
|
||||
b.HasKey("FilterListId", "Iso6391")
|
||||
b.HasKey("FilterListId", "LanguageId")
|
||||
.HasName("pk_filter_list_languages");
|
||||
|
||||
b.HasIndex("Iso6391")
|
||||
.HasDatabaseName("ix_filter_list_languages_iso6391");
|
||||
b.HasIndex("LanguageId")
|
||||
.HasDatabaseName("ix_filter_list_languages_language_id");
|
||||
|
||||
b.ToTable("filter_list_languages", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListMaintainer", b =>
|
||||
{
|
||||
b.Property<int>("FilterListId")
|
||||
.HasColumnType("integer")
|
||||
b.Property<long>("FilterListId")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("filter_list_id");
|
||||
|
||||
b.Property<int>("MaintainerId")
|
||||
.HasColumnType("integer")
|
||||
b.Property<long>("MaintainerId")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("maintainer_id");
|
||||
|
||||
b.HasKey("FilterListId", "MaintainerId")
|
||||
|
|
@ -159,12 +159,12 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListSyntax", b =>
|
||||
{
|
||||
b.Property<int>("FilterListId")
|
||||
.HasColumnType("integer")
|
||||
b.Property<long>("FilterListId")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("filter_list_id");
|
||||
|
||||
b.Property<int>("SyntaxId")
|
||||
.HasColumnType("integer")
|
||||
b.Property<long>("SyntaxId")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("syntax_id");
|
||||
|
||||
b.HasKey("FilterListId", "SyntaxId")
|
||||
|
|
@ -178,12 +178,12 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListTag", b =>
|
||||
{
|
||||
b.Property<int>("FilterListId")
|
||||
.HasColumnType("integer")
|
||||
b.Property<long>("FilterListId")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("filter_list_id");
|
||||
|
||||
b.Property<int>("TagId")
|
||||
.HasColumnType("integer")
|
||||
b.Property<long>("TagId")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("tag_id");
|
||||
|
||||
b.HasKey("FilterListId", "TagId")
|
||||
|
|
@ -197,15 +197,15 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListViewUrl", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||||
|
||||
b.Property<int>("FilterListId")
|
||||
.HasColumnType("integer")
|
||||
b.Property<long>("FilterListId")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("filter_list_id");
|
||||
|
||||
b.Property<short>("Primariness")
|
||||
|
|
@ -237,12 +237,12 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Fork", b =>
|
||||
{
|
||||
b.Property<int>("UpstreamFilterListId")
|
||||
.HasColumnType("integer")
|
||||
b.Property<long>("UpstreamFilterListId")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("upstream_filter_list_id");
|
||||
|
||||
b.Property<int>("ForkFilterListId")
|
||||
.HasColumnType("integer")
|
||||
b.Property<long>("ForkFilterListId")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("fork_filter_list_id");
|
||||
|
||||
b.HasKey("UpstreamFilterListId", "ForkFilterListId")
|
||||
|
|
@ -256,24 +256,36 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Language", b =>
|
||||
{
|
||||
b.Property<string>("Iso6391")
|
||||
.HasMaxLength(2)
|
||||
.HasColumnType("character(2)")
|
||||
.HasColumnName("iso6391")
|
||||
.IsFixedLength();
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||||
|
||||
b.Property<bool>("IsApproved")
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("is_approved");
|
||||
|
||||
b.Property<string>("Iso6391")
|
||||
.IsRequired()
|
||||
.HasMaxLength(2)
|
||||
.HasColumnType("character(2)")
|
||||
.HasColumnName("iso6391")
|
||||
.IsFixedLength();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("name");
|
||||
|
||||
b.HasKey("Iso6391")
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_languages");
|
||||
|
||||
b.HasIndex("Iso6391")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("ix_languages_iso6391");
|
||||
|
||||
b.HasIndex("Name")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("ix_languages_name");
|
||||
|
|
@ -283,12 +295,12 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.License", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||||
|
||||
b.Property<bool>("IsApproved")
|
||||
.HasColumnType("boolean")
|
||||
|
|
@ -333,12 +345,12 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Maintainer", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||||
|
||||
b.Property<string>("EmailAddress")
|
||||
.HasColumnType("text")
|
||||
|
|
@ -373,12 +385,12 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Merge", b =>
|
||||
{
|
||||
b.Property<int>("IncludedInFilterListId")
|
||||
.HasColumnType("integer")
|
||||
b.Property<long>("IncludedInFilterListId")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("included_in_filter_list_id");
|
||||
|
||||
b.Property<int>("IncludesFilterListId")
|
||||
.HasColumnType("integer")
|
||||
b.Property<long>("IncludesFilterListId")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("includes_filter_list_id");
|
||||
|
||||
b.HasKey("IncludedInFilterListId", "IncludesFilterListId")
|
||||
|
|
@ -392,12 +404,12 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Software", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text")
|
||||
|
|
@ -438,12 +450,12 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.SoftwareSyntax", b =>
|
||||
{
|
||||
b.Property<int>("SoftwareId")
|
||||
.HasColumnType("integer")
|
||||
b.Property<long>("SoftwareId")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("software_id");
|
||||
|
||||
b.Property<int>("SyntaxId")
|
||||
.HasColumnType("integer")
|
||||
b.Property<long>("SyntaxId")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("syntax_id");
|
||||
|
||||
b.HasKey("SoftwareId", "SyntaxId")
|
||||
|
|
@ -457,12 +469,12 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Syntax", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text")
|
||||
|
|
@ -493,12 +505,12 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Tag", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text")
|
||||
|
|
@ -567,10 +579,10 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Language", "Language")
|
||||
.WithMany("FilterListLanguages")
|
||||
.HasForeignKey("Iso6391")
|
||||
.HasForeignKey("LanguageId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_filter_list_languages_languages_iso6391");
|
||||
.HasConstraintName("fk_filter_list_languages_languages_language_id");
|
||||
|
||||
b.Navigation("FilterList");
|
||||
|
||||
|
|
@ -13,20 +13,22 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
name: "languages",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
iso6391 = table.Column<string>(type: "character(2)", fixedLength: true, maxLength: 2, nullable: false),
|
||||
name = table.Column<string>(type: "text", nullable: false),
|
||||
is_approved = table.Column<bool>(type: "boolean", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_languages", x => x.iso6391);
|
||||
table.PrimaryKey("pk_languages", x => x.id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "licenses",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
name = table.Column<string>(type: "text", nullable: false),
|
||||
url = table.Column<string>(type: "text", nullable: true),
|
||||
|
|
@ -44,7 +46,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
name: "maintainers",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
name = table.Column<string>(type: "text", nullable: false),
|
||||
url = table.Column<string>(type: "text", nullable: true),
|
||||
|
|
@ -61,7 +63,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
name: "software",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
name = table.Column<string>(type: "text", nullable: false),
|
||||
description = table.Column<string>(type: "text", nullable: true),
|
||||
|
|
@ -79,7 +81,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
name: "syntaxes",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
name = table.Column<string>(type: "text", nullable: false),
|
||||
description = table.Column<string>(type: "text", nullable: true),
|
||||
|
|
@ -95,7 +97,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
name: "tags",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
name = table.Column<string>(type: "text", nullable: false),
|
||||
description = table.Column<string>(type: "text", nullable: true),
|
||||
|
|
@ -110,11 +112,11 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
name: "filter_lists",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
name = table.Column<string>(type: "text", nullable: false),
|
||||
description = table.Column<string>(type: "text", nullable: true),
|
||||
license_id = table.Column<int>(type: "integer", nullable: false, defaultValue: 5),
|
||||
license_id = table.Column<long>(type: "bigint", nullable: false, defaultValue: 5L),
|
||||
home_url = table.Column<string>(type: "text", nullable: true),
|
||||
onion_url = table.Column<string>(type: "text", nullable: true),
|
||||
policy_url = table.Column<string>(type: "text", nullable: true),
|
||||
|
|
@ -141,8 +143,8 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
name: "software_syntaxes",
|
||||
columns: table => new
|
||||
{
|
||||
software_id = table.Column<int>(type: "integer", nullable: false),
|
||||
syntax_id = table.Column<int>(type: "integer", nullable: false)
|
||||
software_id = table.Column<long>(type: "bigint", nullable: false),
|
||||
syntax_id = table.Column<long>(type: "bigint", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
|
|
@ -165,8 +167,8 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
name: "dependents",
|
||||
columns: table => new
|
||||
{
|
||||
dependency_filter_list_id = table.Column<int>(type: "integer", nullable: false),
|
||||
dependent_filter_list_id = table.Column<int>(type: "integer", nullable: false)
|
||||
dependency_filter_list_id = table.Column<long>(type: "bigint", nullable: false),
|
||||
dependent_filter_list_id = table.Column<long>(type: "bigint", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
|
|
@ -189,12 +191,12 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
name: "filter_list_languages",
|
||||
columns: table => new
|
||||
{
|
||||
filter_list_id = table.Column<int>(type: "integer", nullable: false),
|
||||
iso6391 = table.Column<string>(type: "character(2)", nullable: false)
|
||||
filter_list_id = table.Column<long>(type: "bigint", nullable: false),
|
||||
language_id = table.Column<long>(type: "bigint", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_filter_list_languages", x => new { x.filter_list_id, x.iso6391 });
|
||||
table.PrimaryKey("pk_filter_list_languages", x => new { x.filter_list_id, x.language_id });
|
||||
table.ForeignKey(
|
||||
name: "fk_filter_list_languages_filter_lists_filter_list_id",
|
||||
column: x => x.filter_list_id,
|
||||
|
|
@ -202,10 +204,10 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "fk_filter_list_languages_languages_iso6391",
|
||||
column: x => x.iso6391,
|
||||
name: "fk_filter_list_languages_languages_language_id",
|
||||
column: x => x.language_id,
|
||||
principalTable: "languages",
|
||||
principalColumn: "iso6391",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
|
|
@ -213,8 +215,8 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
name: "filter_list_maintainers",
|
||||
columns: table => new
|
||||
{
|
||||
filter_list_id = table.Column<int>(type: "integer", nullable: false),
|
||||
maintainer_id = table.Column<int>(type: "integer", nullable: false)
|
||||
filter_list_id = table.Column<long>(type: "bigint", nullable: false),
|
||||
maintainer_id = table.Column<long>(type: "bigint", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
|
|
@ -237,8 +239,8 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
name: "filter_list_syntaxes",
|
||||
columns: table => new
|
||||
{
|
||||
filter_list_id = table.Column<int>(type: "integer", nullable: false),
|
||||
syntax_id = table.Column<int>(type: "integer", nullable: false)
|
||||
filter_list_id = table.Column<long>(type: "bigint", nullable: false),
|
||||
syntax_id = table.Column<long>(type: "bigint", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
|
|
@ -261,8 +263,8 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
name: "filter_list_tags",
|
||||
columns: table => new
|
||||
{
|
||||
filter_list_id = table.Column<int>(type: "integer", nullable: false),
|
||||
tag_id = table.Column<int>(type: "integer", nullable: false)
|
||||
filter_list_id = table.Column<long>(type: "bigint", nullable: false),
|
||||
tag_id = table.Column<long>(type: "bigint", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
|
|
@ -285,9 +287,9 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
name: "filter_list_view_urls",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
filter_list_id = table.Column<int>(type: "integer", nullable: false),
|
||||
filter_list_id = table.Column<long>(type: "bigint", nullable: false),
|
||||
segment_number = table.Column<short>(type: "smallint", nullable: false, defaultValue: (short)1),
|
||||
primariness = table.Column<short>(type: "smallint", nullable: false, defaultValue: (short)1),
|
||||
url = table.Column<string>(type: "text", nullable: false)
|
||||
|
|
@ -307,8 +309,8 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
name: "forks",
|
||||
columns: table => new
|
||||
{
|
||||
upstream_filter_list_id = table.Column<int>(type: "integer", nullable: false),
|
||||
fork_filter_list_id = table.Column<int>(type: "integer", nullable: false)
|
||||
upstream_filter_list_id = table.Column<long>(type: "bigint", nullable: false),
|
||||
fork_filter_list_id = table.Column<long>(type: "bigint", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
|
|
@ -331,8 +333,8 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
name: "merges",
|
||||
columns: table => new
|
||||
{
|
||||
included_in_filter_list_id = table.Column<int>(type: "integer", nullable: false),
|
||||
includes_filter_list_id = table.Column<int>(type: "integer", nullable: false)
|
||||
included_in_filter_list_id = table.Column<long>(type: "bigint", nullable: false),
|
||||
includes_filter_list_id = table.Column<long>(type: "bigint", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
|
|
@ -357,9 +359,9 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
column: "dependent_filter_list_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_filter_list_languages_iso6391",
|
||||
name: "ix_filter_list_languages_language_id",
|
||||
table: "filter_list_languages",
|
||||
column: "iso6391");
|
||||
column: "language_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_filter_list_maintainers_maintainer_id",
|
||||
|
|
@ -398,6 +400,12 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
table: "forks",
|
||||
column: "fork_filter_list_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_languages_iso6391",
|
||||
table: "languages",
|
||||
column: "iso6391",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_languages_name",
|
||||
table: "languages",
|
||||
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue