mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
parent
acfd89ba9f
commit
04984fb6e9
4 changed files with 1141 additions and 418 deletions
|
|
@ -1,5 +1,4 @@
|
|||
using FilterLists.Api.Migrations.Extensions;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace FilterLists.Api.Migrations
|
||||
|
|
@ -8,7 +7,7 @@ public partial class UseSignedPrimaryKeys : Migration
|
|||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropFK_filterlists_tags_tags_TagId();
|
||||
DropFK_filterlists_tags_tags_TagId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<short>(
|
||||
"Id",
|
||||
|
|
@ -27,11 +26,11 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(byte));
|
||||
|
||||
migrationBuilder.AddFK_filterlists_tags_tags_TagId();
|
||||
AddFK_filterlists_tags_tags_TagId(migrationBuilder);
|
||||
|
||||
migrationBuilder.DropFK_filterlists_syntaxes_SyntaxId();
|
||||
DropFK_filterlists_syntaxes_SyntaxId(migrationBuilder);
|
||||
|
||||
migrationBuilder.DropFK_software_syntaxes_syntaxes_SyntaxId();
|
||||
DropFK_software_syntaxes_syntaxes_SyntaxId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<short>(
|
||||
"Id",
|
||||
|
|
@ -51,7 +50,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
oldClrType: typeof(byte),
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddFK_filterlists_syntaxes_SyntaxId();
|
||||
AddFK_filterlists_syntaxes_SyntaxId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<short>(
|
||||
"SyntaxId",
|
||||
|
|
@ -59,9 +58,9 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(byte));
|
||||
|
||||
migrationBuilder.AddFK_software_syntaxes_syntaxes_SyntaxId();
|
||||
AddFK_software_syntaxes_syntaxes_SyntaxId(migrationBuilder);
|
||||
|
||||
migrationBuilder.DropFK_software_syntaxes_software_SoftwareId();
|
||||
DropFK_software_syntaxes_software_SoftwareId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<short>(
|
||||
"SoftwareId",
|
||||
|
|
@ -80,9 +79,9 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
.OldAnnotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
migrationBuilder.AddFK_software_syntaxes_software_SoftwareId();
|
||||
AddFK_software_syntaxes_software_SoftwareId(migrationBuilder);
|
||||
|
||||
migrationBuilder.DropFK_snapshots_rules_rules_RuleId();
|
||||
DropFK_snapshots_rules_rules_RuleId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
"RuleId",
|
||||
|
|
@ -101,9 +100,9 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
.OldAnnotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
migrationBuilder.AddFK_snapshots_rules_rules_RuleId();
|
||||
AddFK_snapshots_rules_rules_RuleId(migrationBuilder);
|
||||
|
||||
migrationBuilder.DropFK_snapshots_rules_snapshots_SnapshotId();
|
||||
DropFK_snapshots_rules_snapshots_SnapshotId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
"SnapshotId",
|
||||
|
|
@ -122,9 +121,9 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
.OldAnnotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
migrationBuilder.AddFK_snapshots_rules_snapshots_SnapshotId();
|
||||
AddFK_snapshots_rules_snapshots_SnapshotId(migrationBuilder);
|
||||
|
||||
migrationBuilder.DropFK_snapshots_filterlists_FilterListId();
|
||||
DropFK_snapshots_filterlists_FilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<short>(
|
||||
"FilterListId",
|
||||
|
|
@ -132,7 +131,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(ushort));
|
||||
|
||||
migrationBuilder.DropFK_merges_filterlists_UpstreamFilterListId();
|
||||
DropFK_merges_filterlists_UpstreamFilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<short>(
|
||||
"UpstreamFilterListId",
|
||||
|
|
@ -140,7 +139,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(ushort));
|
||||
|
||||
migrationBuilder.DropFK_merges_filterlists_MergeFilterListId();
|
||||
DropFK_merges_filterlists_MergeFilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<short>(
|
||||
"MergeFilterListId",
|
||||
|
|
@ -148,7 +147,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(ushort));
|
||||
|
||||
migrationBuilder.DropFK_forks_filterlists_UpstreamFilterListId();
|
||||
DropFK_forks_filterlists_UpstreamFilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<short>(
|
||||
"UpstreamFilterListId",
|
||||
|
|
@ -156,7 +155,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(ushort));
|
||||
|
||||
migrationBuilder.DropFK_forks_filterlists_ForkFilterListId();
|
||||
DropFK_forks_filterlists_ForkFilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<short>(
|
||||
"ForkFilterListId",
|
||||
|
|
@ -164,7 +163,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(ushort));
|
||||
|
||||
migrationBuilder.DropFK_filterlists_tags_filterlists_FilterListId();
|
||||
DropFK_filterlists_tags_filterlists_FilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<short>(
|
||||
"FilterListId",
|
||||
|
|
@ -172,7 +171,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(ushort));
|
||||
|
||||
migrationBuilder.DropFK_filterlists_maintainers_filterlists_FilterListId();
|
||||
DropFK_filterlists_maintainers_filterlists_FilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<short>(
|
||||
"FilterListId",
|
||||
|
|
@ -180,7 +179,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(ushort));
|
||||
|
||||
migrationBuilder.DropFK_filterlists_languages_filterlists_FilterListId();
|
||||
DropFK_filterlists_languages_filterlists_FilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<short>(
|
||||
"FilterListId",
|
||||
|
|
@ -188,9 +187,9 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(ushort));
|
||||
|
||||
migrationBuilder.DropFK_dependents_filterlists_DependencyFilterListId();
|
||||
DropFK_dependents_filterlists_DependencyFilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.DropFK_dependents_filterlists_DependentFilterListId();
|
||||
DropFK_dependents_filterlists_DependentFilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<short>(
|
||||
"Id",
|
||||
|
|
@ -203,21 +202,21 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
.OldAnnotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
migrationBuilder.AddFK_snapshots_filterlists_FilterListId();
|
||||
AddFK_snapshots_filterlists_FilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AddFK_merges_filterlists_UpstreamFilterListId();
|
||||
AddFK_merges_filterlists_UpstreamFilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AddFK_merges_filterlists_MergeFilterListId();
|
||||
AddFK_merges_filterlists_MergeFilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AddFK_forks_filterlists_UpstreamFilterListId();
|
||||
AddFK_forks_filterlists_UpstreamFilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AddFK_forks_filterlists_ForkFilterListId();
|
||||
AddFK_forks_filterlists_ForkFilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AddFK_filterlists_tags_filterlists_FilterListId();
|
||||
AddFK_filterlists_tags_filterlists_FilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AddFK_filterlists_maintainers_filterlists_FilterListId();
|
||||
AddFK_filterlists_maintainers_filterlists_FilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AddFK_filterlists_languages_filterlists_FilterListId();
|
||||
AddFK_filterlists_languages_filterlists_FilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<short>(
|
||||
"DependencyFilterListId",
|
||||
|
|
@ -225,7 +224,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(ushort));
|
||||
|
||||
migrationBuilder.AddFK_dependents_filterlists_DependencyFilterListId();
|
||||
AddFK_dependents_filterlists_DependencyFilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<short>(
|
||||
"DependentFilterListId",
|
||||
|
|
@ -233,9 +232,9 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(ushort));
|
||||
|
||||
migrationBuilder.AddFK_dependents_filterlists_DependentFilterListId();
|
||||
AddFK_dependents_filterlists_DependentFilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.DropFK_filterlists_maintainers_maintainers_MaintainerId();
|
||||
DropFK_filterlists_maintainers_maintainers_MaintainerId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<short>(
|
||||
"Id",
|
||||
|
|
@ -254,9 +253,9 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(ushort));
|
||||
|
||||
migrationBuilder.AddFK_filterlists_maintainers_maintainers_MaintainerId();
|
||||
AddFK_filterlists_maintainers_maintainers_MaintainerId(migrationBuilder);
|
||||
|
||||
migrationBuilder.DropFK_filterlists_licenses_LicenseId();
|
||||
DropFK_filterlists_licenses_LicenseId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<short>(
|
||||
"Id",
|
||||
|
|
@ -278,9 +277,9 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
oldNullable: true,
|
||||
oldDefaultValue: (byte)5);
|
||||
|
||||
migrationBuilder.AddFK_filterlists_licenses_LicenseId();
|
||||
AddFK_filterlists_licenses_LicenseId(migrationBuilder);
|
||||
|
||||
migrationBuilder.DropFK_filterlists_languages_languages_LanguageId();
|
||||
DropFK_filterlists_languages_languages_LanguageId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<short>(
|
||||
"Id",
|
||||
|
|
@ -299,12 +298,12 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(ushort));
|
||||
|
||||
migrationBuilder.AddFK_filterlists_languages_languages_LanguageId();
|
||||
AddFK_filterlists_languages_languages_LanguageId(migrationBuilder);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropFK_filterlists_tags_tags_TagId();
|
||||
DropFK_filterlists_tags_tags_TagId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<byte>(
|
||||
"Id",
|
||||
|
|
@ -323,11 +322,11 @@ protected override void Down(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(short));
|
||||
|
||||
migrationBuilder.AddFK_filterlists_tags_tags_TagId();
|
||||
AddFK_filterlists_tags_tags_TagId(migrationBuilder);
|
||||
|
||||
migrationBuilder.DropFK_filterlists_syntaxes_SyntaxId();
|
||||
DropFK_filterlists_syntaxes_SyntaxId(migrationBuilder);
|
||||
|
||||
migrationBuilder.DropFK_software_syntaxes_syntaxes_SyntaxId();
|
||||
DropFK_software_syntaxes_syntaxes_SyntaxId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<byte>(
|
||||
"Id",
|
||||
|
|
@ -347,7 +346,7 @@ protected override void Down(MigrationBuilder migrationBuilder)
|
|||
oldClrType: typeof(short),
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddFK_filterlists_syntaxes_SyntaxId();
|
||||
AddFK_filterlists_syntaxes_SyntaxId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<byte>(
|
||||
"SyntaxId",
|
||||
|
|
@ -355,9 +354,9 @@ protected override void Down(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(short));
|
||||
|
||||
migrationBuilder.AddFK_software_syntaxes_syntaxes_SyntaxId();
|
||||
AddFK_software_syntaxes_syntaxes_SyntaxId(migrationBuilder);
|
||||
|
||||
migrationBuilder.DropFK_software_syntaxes_software_SoftwareId();
|
||||
DropFK_software_syntaxes_software_SoftwareId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<byte>(
|
||||
"SoftwareId",
|
||||
|
|
@ -376,9 +375,9 @@ protected override void Down(MigrationBuilder migrationBuilder)
|
|||
.OldAnnotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
migrationBuilder.AddFK_software_syntaxes_software_SoftwareId();
|
||||
AddFK_software_syntaxes_software_SoftwareId(migrationBuilder);
|
||||
|
||||
migrationBuilder.DropFK_snapshots_rules_rules_RuleId();
|
||||
DropFK_snapshots_rules_rules_RuleId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<uint>(
|
||||
"RuleId",
|
||||
|
|
@ -397,9 +396,9 @@ protected override void Down(MigrationBuilder migrationBuilder)
|
|||
.OldAnnotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
migrationBuilder.AddFK_snapshots_rules_rules_RuleId();
|
||||
AddFK_snapshots_rules_rules_RuleId(migrationBuilder);
|
||||
|
||||
migrationBuilder.DropFK_snapshots_rules_snapshots_SnapshotId();
|
||||
DropFK_snapshots_rules_snapshots_SnapshotId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<uint>(
|
||||
"SnapshotId",
|
||||
|
|
@ -418,9 +417,9 @@ protected override void Down(MigrationBuilder migrationBuilder)
|
|||
.OldAnnotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
migrationBuilder.AddFK_snapshots_rules_snapshots_SnapshotId();
|
||||
AddFK_snapshots_rules_snapshots_SnapshotId(migrationBuilder);
|
||||
|
||||
migrationBuilder.DropFK_snapshots_filterlists_FilterListId();
|
||||
DropFK_snapshots_filterlists_FilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<ushort>(
|
||||
"FilterListId",
|
||||
|
|
@ -428,7 +427,7 @@ protected override void Down(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(short));
|
||||
|
||||
migrationBuilder.DropFK_merges_filterlists_UpstreamFilterListId();
|
||||
DropFK_merges_filterlists_UpstreamFilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<ushort>(
|
||||
"UpstreamFilterListId",
|
||||
|
|
@ -436,7 +435,7 @@ protected override void Down(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(short));
|
||||
|
||||
migrationBuilder.DropFK_merges_filterlists_MergeFilterListId();
|
||||
DropFK_merges_filterlists_MergeFilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<ushort>(
|
||||
"MergeFilterListId",
|
||||
|
|
@ -444,7 +443,7 @@ protected override void Down(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(short));
|
||||
|
||||
migrationBuilder.DropFK_forks_filterlists_UpstreamFilterListId();
|
||||
DropFK_forks_filterlists_UpstreamFilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<ushort>(
|
||||
"UpstreamFilterListId",
|
||||
|
|
@ -452,7 +451,7 @@ protected override void Down(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(short));
|
||||
|
||||
migrationBuilder.DropFK_forks_filterlists_ForkFilterListId();
|
||||
DropFK_forks_filterlists_ForkFilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<ushort>(
|
||||
"ForkFilterListId",
|
||||
|
|
@ -460,7 +459,7 @@ protected override void Down(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(short));
|
||||
|
||||
migrationBuilder.DropFK_filterlists_tags_filterlists_FilterListId();
|
||||
DropFK_filterlists_tags_filterlists_FilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<ushort>(
|
||||
"FilterListId",
|
||||
|
|
@ -468,7 +467,7 @@ protected override void Down(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(short));
|
||||
|
||||
migrationBuilder.DropFK_filterlists_maintainers_filterlists_FilterListId();
|
||||
DropFK_filterlists_maintainers_filterlists_FilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<ushort>(
|
||||
"FilterListId",
|
||||
|
|
@ -476,7 +475,7 @@ protected override void Down(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(short));
|
||||
|
||||
migrationBuilder.DropFK_filterlists_languages_filterlists_FilterListId();
|
||||
DropFK_filterlists_languages_filterlists_FilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<ushort>(
|
||||
"FilterListId",
|
||||
|
|
@ -484,9 +483,9 @@ protected override void Down(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(short));
|
||||
|
||||
migrationBuilder.DropFK_dependents_filterlists_DependencyFilterListId();
|
||||
DropFK_dependents_filterlists_DependencyFilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.DropFK_dependents_filterlists_DependentFilterListId();
|
||||
DropFK_dependents_filterlists_DependentFilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<ushort>(
|
||||
"Id",
|
||||
|
|
@ -499,21 +498,21 @@ protected override void Down(MigrationBuilder migrationBuilder)
|
|||
.OldAnnotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
migrationBuilder.AddFK_snapshots_filterlists_FilterListId();
|
||||
AddFK_snapshots_filterlists_FilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AddFK_merges_filterlists_UpstreamFilterListId();
|
||||
AddFK_merges_filterlists_UpstreamFilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AddFK_merges_filterlists_MergeFilterListId();
|
||||
AddFK_merges_filterlists_MergeFilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AddFK_forks_filterlists_UpstreamFilterListId();
|
||||
AddFK_forks_filterlists_UpstreamFilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AddFK_forks_filterlists_ForkFilterListId();
|
||||
AddFK_forks_filterlists_ForkFilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AddFK_filterlists_tags_filterlists_FilterListId();
|
||||
AddFK_filterlists_tags_filterlists_FilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AddFK_filterlists_maintainers_filterlists_FilterListId();
|
||||
AddFK_filterlists_maintainers_filterlists_FilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AddFK_filterlists_languages_filterlists_FilterListId();
|
||||
AddFK_filterlists_languages_filterlists_FilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<ushort>(
|
||||
"DependencyFilterListId",
|
||||
|
|
@ -521,7 +520,7 @@ protected override void Down(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(short));
|
||||
|
||||
migrationBuilder.AddFK_dependents_filterlists_DependencyFilterListId();
|
||||
AddFK_dependents_filterlists_DependencyFilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<ushort>(
|
||||
"DependentFilterListId",
|
||||
|
|
@ -529,9 +528,9 @@ protected override void Down(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(short));
|
||||
|
||||
migrationBuilder.AddFK_dependents_filterlists_DependentFilterListId();
|
||||
AddFK_dependents_filterlists_DependentFilterListId(migrationBuilder);
|
||||
|
||||
migrationBuilder.DropFK_filterlists_maintainers_maintainers_MaintainerId();
|
||||
DropFK_filterlists_maintainers_maintainers_MaintainerId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<ushort>(
|
||||
"Id",
|
||||
|
|
@ -550,9 +549,9 @@ protected override void Down(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(short));
|
||||
|
||||
migrationBuilder.AddFK_filterlists_maintainers_maintainers_MaintainerId();
|
||||
AddFK_filterlists_maintainers_maintainers_MaintainerId(migrationBuilder);
|
||||
|
||||
migrationBuilder.DropFK_filterlists_licenses_LicenseId();
|
||||
DropFK_filterlists_licenses_LicenseId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<byte>(
|
||||
"Id",
|
||||
|
|
@ -574,9 +573,9 @@ protected override void Down(MigrationBuilder migrationBuilder)
|
|||
oldNullable: true,
|
||||
oldDefaultValue: (short)5);
|
||||
|
||||
migrationBuilder.AddFK_filterlists_licenses_LicenseId();
|
||||
AddFK_filterlists_licenses_LicenseId(migrationBuilder);
|
||||
|
||||
migrationBuilder.DropFK_filterlists_languages_languages_LanguageId();
|
||||
DropFK_filterlists_languages_languages_LanguageId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AlterColumn<ushort>(
|
||||
"Id",
|
||||
|
|
@ -595,7 +594,347 @@ protected override void Down(MigrationBuilder migrationBuilder)
|
|||
nullable: false,
|
||||
oldClrType: typeof(short));
|
||||
|
||||
migrationBuilder.AddFK_filterlists_languages_languages_LanguageId();
|
||||
AddFK_filterlists_languages_languages_LanguageId(migrationBuilder);
|
||||
}
|
||||
|
||||
private static void DropFK_filterlists_tags_tags_TagId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_filterlists_tags_tags_TagId",
|
||||
"filterlists_tags");
|
||||
}
|
||||
|
||||
private static void AddFK_filterlists_tags_tags_TagId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_filterlists_tags_tags_TagId",
|
||||
"filterlists_tags",
|
||||
"TagId",
|
||||
"tags",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
private static void DropFK_filterlists_syntaxes_SyntaxId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_filterlists_syntaxes_SyntaxId",
|
||||
"filterlists");
|
||||
}
|
||||
|
||||
private static void AddFK_filterlists_syntaxes_SyntaxId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_filterlists_syntaxes_SyntaxId",
|
||||
"filterlists",
|
||||
"SyntaxId",
|
||||
"syntaxes",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
private static void DropFK_software_syntaxes_syntaxes_SyntaxId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_software_syntaxes_syntaxes_SyntaxId",
|
||||
"software_syntaxes");
|
||||
}
|
||||
|
||||
private static void AddFK_software_syntaxes_syntaxes_SyntaxId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_software_syntaxes_syntaxes_SyntaxId",
|
||||
"software_syntaxes",
|
||||
"SyntaxId",
|
||||
"syntaxes",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
private static void DropFK_software_syntaxes_software_SoftwareId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_software_syntaxes_software_SoftwareId",
|
||||
"software_syntaxes");
|
||||
}
|
||||
|
||||
private static void AddFK_software_syntaxes_software_SoftwareId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_software_syntaxes_software_SoftwareId",
|
||||
"software_syntaxes",
|
||||
"SoftwareId",
|
||||
"software",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
private static void DropFK_snapshots_rules_rules_RuleId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_snapshots_rules_rules_RuleId",
|
||||
"snapshots_rules");
|
||||
}
|
||||
|
||||
private static void AddFK_snapshots_rules_rules_RuleId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_snapshots_rules_rules_RuleId",
|
||||
"snapshots_rules",
|
||||
"RuleId",
|
||||
"rules",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
private static void DropFK_snapshots_rules_snapshots_SnapshotId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_snapshots_rules_snapshots_SnapshotId",
|
||||
"snapshots_rules");
|
||||
}
|
||||
|
||||
private static void AddFK_snapshots_rules_snapshots_SnapshotId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_snapshots_rules_snapshots_SnapshotId",
|
||||
"snapshots_rules",
|
||||
"SnapshotId",
|
||||
"snapshots",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
private static void DropFK_snapshots_filterlists_FilterListId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_snapshots_filterlists_FilterListId",
|
||||
"snapshots");
|
||||
}
|
||||
|
||||
private static void AddFK_snapshots_filterlists_FilterListId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_snapshots_filterlists_FilterListId",
|
||||
"snapshots",
|
||||
"FilterListId",
|
||||
"filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
private static void DropFK_merges_filterlists_UpstreamFilterListId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_merges_filterlists_UpstreamFilterListId",
|
||||
"merges");
|
||||
}
|
||||
|
||||
private static void AddFK_merges_filterlists_UpstreamFilterListId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_merges_filterlists_UpstreamFilterListId",
|
||||
"merges",
|
||||
"UpstreamFilterListId",
|
||||
"filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
private static void DropFK_merges_filterlists_MergeFilterListId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_merges_filterlists_MergeFilterListId",
|
||||
"merges");
|
||||
}
|
||||
|
||||
private static void AddFK_merges_filterlists_MergeFilterListId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_merges_filterlists_MergeFilterListId",
|
||||
"merges",
|
||||
"MergeFilterListId",
|
||||
"filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
private static void DropFK_forks_filterlists_UpstreamFilterListId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_forks_filterlists_UpstreamFilterListId",
|
||||
"forks");
|
||||
}
|
||||
|
||||
private static void AddFK_forks_filterlists_UpstreamFilterListId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_forks_filterlists_UpstreamFilterListId",
|
||||
"forks",
|
||||
"UpstreamFilterListId",
|
||||
"filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
private static void DropFK_forks_filterlists_ForkFilterListId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_forks_filterlists_ForkFilterListId",
|
||||
"forks");
|
||||
}
|
||||
|
||||
private static void AddFK_forks_filterlists_ForkFilterListId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_forks_filterlists_ForkFilterListId",
|
||||
"forks",
|
||||
"ForkFilterListId",
|
||||
"filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
private static void DropFK_filterlists_tags_filterlists_FilterListId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_filterlists_tags_filterlists_FilterListId",
|
||||
"filterlists_tags");
|
||||
}
|
||||
|
||||
private static void AddFK_filterlists_tags_filterlists_FilterListId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_filterlists_tags_filterlists_FilterListId",
|
||||
"filterlists_tags",
|
||||
"FilterListId",
|
||||
"filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
private static void DropFK_filterlists_maintainers_filterlists_FilterListId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_filterlists_maintainers_filterlists_FilterListId",
|
||||
"filterlists_maintainers");
|
||||
}
|
||||
|
||||
private static void AddFK_filterlists_maintainers_filterlists_FilterListId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_filterlists_maintainers_filterlists_FilterListId",
|
||||
"filterlists_maintainers",
|
||||
"FilterListId",
|
||||
"filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
private static void DropFK_filterlists_languages_filterlists_FilterListId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_filterlists_languages_filterlists_FilterListId",
|
||||
"filterlists_languages");
|
||||
}
|
||||
|
||||
private static void AddFK_filterlists_languages_filterlists_FilterListId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_filterlists_languages_filterlists_FilterListId",
|
||||
"filterlists_languages",
|
||||
"FilterListId",
|
||||
"filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
private static void DropFK_dependents_filterlists_DependencyFilterListId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_dependents_filterlists_DependencyFilterListId",
|
||||
"dependents");
|
||||
}
|
||||
|
||||
private static void AddFK_dependents_filterlists_DependencyFilterListId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_dependents_filterlists_DependencyFilterListId",
|
||||
"dependents",
|
||||
"DependencyFilterListId",
|
||||
"filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
private static void DropFK_dependents_filterlists_DependentFilterListId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_dependents_filterlists_DependentFilterListId",
|
||||
"dependents");
|
||||
}
|
||||
|
||||
private static void AddFK_dependents_filterlists_DependentFilterListId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_dependents_filterlists_DependentFilterListId",
|
||||
"dependents",
|
||||
"DependentFilterListId",
|
||||
"filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
private static void DropFK_filterlists_maintainers_maintainers_MaintainerId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_filterlists_maintainers_maintainers_MaintainerId",
|
||||
"filterlists_maintainers");
|
||||
}
|
||||
|
||||
private static void AddFK_filterlists_maintainers_maintainers_MaintainerId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_filterlists_maintainers_maintainers_MaintainerId",
|
||||
"filterlists_maintainers",
|
||||
"MaintainerId",
|
||||
"maintainers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
private static void DropFK_filterlists_licenses_LicenseId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_filterlists_licenses_LicenseId",
|
||||
"filterlists");
|
||||
}
|
||||
|
||||
private static void AddFK_filterlists_licenses_LicenseId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_filterlists_licenses_LicenseId",
|
||||
"filterlists",
|
||||
"LicenseId",
|
||||
"licenses",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
private static void DropFK_filterlists_languages_languages_LanguageId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_filterlists_languages_languages_LanguageId",
|
||||
"filterlists_languages");
|
||||
}
|
||||
|
||||
private static void AddFK_filterlists_languages_languages_LanguageId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_filterlists_languages_languages_LanguageId",
|
||||
"filterlists_languages",
|
||||
"LanguageId",
|
||||
"languages",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
684
src/FilterLists.Api/Migrations/20181019122801_CleanupUseSignedPrimaryKeys.Designer.cs
generated
Normal file
684
src/FilterLists.Api/Migrations/20181019122801_CleanupUseSignedPrimaryKeys.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,684 @@
|
|||
// <auto-generated />
|
||||
|
||||
using System;
|
||||
using FilterLists.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace FilterLists.Api.Migrations
|
||||
{
|
||||
[DbContext(typeof(FilterListsDbContext))]
|
||||
[Migration("20181019122801_CleanupUseSignedPrimaryKeys")]
|
||||
partial class CleanupUseSignedPrimaryKeys
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "2.1.4-rtm-31024")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.FilterList", b =>
|
||||
{
|
||||
b.Property<short>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("SMALLINT")
|
||||
.HasAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
b.Property<string>("ChatUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime?>("CreatedDateUtc")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("current_timestamp()");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("DescriptionSourceUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("DonateUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("EmailAddress")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(126)")
|
||||
.HasDefaultValueSql("NULL");
|
||||
|
||||
b.Property<string>("ForumUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("HomeUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("IssuesUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<short?>("LicenseId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasDefaultValue((short)5);
|
||||
|
||||
b.Property<DateTime?>("ModifiedDateUtc")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("current_timestamp() ON UPDATE current_timestamp()");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("VARCHAR(126)");
|
||||
|
||||
b.Property<string>("PolicyUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime?>("PublishedDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("DATETIME")
|
||||
.HasDefaultValueSql("NULL");
|
||||
|
||||
b.Property<string>("SubmissionUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<short?>("SyntaxId");
|
||||
|
||||
b.Property<DateTime?>("UpdatedDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("DATETIME")
|
||||
.HasDefaultValueSql("NULL");
|
||||
|
||||
b.Property<string>("ViewUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("ViewUrlMirror1")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("ViewUrlMirror2")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("LicenseId");
|
||||
|
||||
b.HasIndex("SyntaxId");
|
||||
|
||||
b.ToTable("filterlists");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.Dependent", b =>
|
||||
{
|
||||
b.Property<short>("DependentFilterListId");
|
||||
|
||||
b.Property<short>("DependencyFilterListId");
|
||||
|
||||
b.Property<DateTime?>("CreatedDateUtc")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("current_timestamp()");
|
||||
|
||||
b.HasKey("DependentFilterListId", "DependencyFilterListId");
|
||||
|
||||
b.HasIndex("DependencyFilterListId");
|
||||
|
||||
b.ToTable("dependents");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.FilterListLanguage", b =>
|
||||
{
|
||||
b.Property<short>("FilterListId");
|
||||
|
||||
b.Property<short>("LanguageId");
|
||||
|
||||
b.Property<DateTime?>("CreatedDateUtc")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("current_timestamp()");
|
||||
|
||||
b.HasKey("FilterListId", "LanguageId");
|
||||
|
||||
b.HasIndex("LanguageId");
|
||||
|
||||
b.ToTable("filterlists_languages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.FilterListMaintainer", b =>
|
||||
{
|
||||
b.Property<short>("FilterListId");
|
||||
|
||||
b.Property<short>("MaintainerId");
|
||||
|
||||
b.Property<DateTime?>("CreatedDateUtc")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("current_timestamp()");
|
||||
|
||||
b.HasKey("FilterListId", "MaintainerId");
|
||||
|
||||
b.HasIndex("MaintainerId");
|
||||
|
||||
b.ToTable("filterlists_maintainers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.FilterListTag", b =>
|
||||
{
|
||||
b.Property<short>("FilterListId");
|
||||
|
||||
b.Property<short>("TagId");
|
||||
|
||||
b.Property<DateTime?>("CreatedDateUtc")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("current_timestamp()");
|
||||
|
||||
b.HasKey("FilterListId", "TagId");
|
||||
|
||||
b.HasIndex("TagId");
|
||||
|
||||
b.ToTable("filterlists_tags");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.Fork", b =>
|
||||
{
|
||||
b.Property<short>("ForkFilterListId");
|
||||
|
||||
b.Property<short>("UpstreamFilterListId");
|
||||
|
||||
b.Property<DateTime?>("CreatedDateUtc")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("current_timestamp()");
|
||||
|
||||
b.HasKey("ForkFilterListId", "UpstreamFilterListId");
|
||||
|
||||
b.HasIndex("UpstreamFilterListId");
|
||||
|
||||
b.ToTable("forks");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.Merge", b =>
|
||||
{
|
||||
b.Property<short>("MergeFilterListId");
|
||||
|
||||
b.Property<short>("UpstreamFilterListId");
|
||||
|
||||
b.Property<DateTime?>("CreatedDateUtc")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("current_timestamp()");
|
||||
|
||||
b.HasKey("MergeFilterListId", "UpstreamFilterListId");
|
||||
|
||||
b.HasIndex("UpstreamFilterListId");
|
||||
|
||||
b.ToTable("merges");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.SnapshotRule", b =>
|
||||
{
|
||||
b.Property<int>("SnapshotId");
|
||||
|
||||
b.Property<int>("RuleId");
|
||||
|
||||
b.HasKey("SnapshotId", "RuleId");
|
||||
|
||||
b.HasIndex("RuleId");
|
||||
|
||||
b.ToTable("snapshots_rules");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.SoftwareSyntax", b =>
|
||||
{
|
||||
b.Property<short>("SyntaxId");
|
||||
|
||||
b.Property<short>("SoftwareId");
|
||||
|
||||
b.Property<DateTime?>("CreatedDateUtc")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("current_timestamp()");
|
||||
|
||||
b.HasKey("SyntaxId", "SoftwareId");
|
||||
|
||||
b.HasIndex("SoftwareId");
|
||||
|
||||
b.ToTable("software_syntaxes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Language", b =>
|
||||
{
|
||||
b.Property<short>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("SMALLINT")
|
||||
.HasAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
b.Property<DateTime?>("CreatedDateUtc")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("current_timestamp()");
|
||||
|
||||
b.Property<string>("Iso6391")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(2)")
|
||||
.HasDefaultValueSql("NULL");
|
||||
|
||||
b.Property<string>("Iso6392")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(3)")
|
||||
.HasDefaultValueSql("NULL");
|
||||
|
||||
b.Property<string>("Iso6392B")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(3)")
|
||||
.HasDefaultValueSql("NULL");
|
||||
|
||||
b.Property<string>("Iso6392T")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(3)")
|
||||
.HasDefaultValueSql("NULL");
|
||||
|
||||
b.Property<string>("Iso6393")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(3)")
|
||||
.HasDefaultValueSql("NULL");
|
||||
|
||||
b.Property<string>("LocalName")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(126)")
|
||||
.HasDefaultValueSql("NULL");
|
||||
|
||||
b.Property<DateTime?>("ModifiedDateUtc")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("current_timestamp() ON UPDATE current_timestamp()");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(126)")
|
||||
.HasDefaultValueSql("NULL");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("languages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.License", b =>
|
||||
{
|
||||
b.Property<short>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("SMALLINT")
|
||||
.HasAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
b.Property<DateTime?>("CreatedDateUtc")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("current_timestamp()");
|
||||
|
||||
b.Property<string>("DescriptionUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime?>("ModifiedDateUtc")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("current_timestamp() ON UPDATE current_timestamp()");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("VARCHAR(126)");
|
||||
|
||||
b.Property<bool>("PermissiveAdaptation");
|
||||
|
||||
b.Property<bool>("PermissiveCommercial");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("licenses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Maintainer", b =>
|
||||
{
|
||||
b.Property<short>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("SMALLINT")
|
||||
.HasAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
b.Property<DateTime?>("CreatedDateUtc")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("current_timestamp()");
|
||||
|
||||
b.Property<string>("EmailAddress")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(126)")
|
||||
.HasDefaultValueSql("NULL");
|
||||
|
||||
b.Property<string>("HomeUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime?>("ModifiedDateUtc")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("current_timestamp() ON UPDATE current_timestamp()");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("VARCHAR(126)");
|
||||
|
||||
b.Property<string>("TwitterHandle")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(126)")
|
||||
.HasDefaultValueSql("NULL");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("maintainers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Rule", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INT")
|
||||
.HasAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
b.Property<DateTime?>("CreatedDateUtc")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("current_timestamp()");
|
||||
|
||||
b.Property<string>("Raw")
|
||||
.IsRequired()
|
||||
.HasColumnType("LONGTEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("rules");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Snapshot", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("MEDIUMINT")
|
||||
.HasAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
b.Property<DateTime?>("CreatedDateUtc")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("current_timestamp()");
|
||||
|
||||
b.Property<short>("FilterListId");
|
||||
|
||||
b.Property<short?>("HttpStatusCode")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("SMALLINT")
|
||||
.HasDefaultValueSql("NULL");
|
||||
|
||||
b.Property<byte[]>("Md5Checksum")
|
||||
.HasColumnType("BINARY(16)");
|
||||
|
||||
b.Property<DateTime?>("ModifiedDateUtc")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("current_timestamp() ON UPDATE current_timestamp()");
|
||||
|
||||
b.Property<bool>("WasSuccessful");
|
||||
|
||||
b.Property<bool>("WasUpdated");
|
||||
|
||||
b.Property<DateTime?>("WaybackTimestamp")
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.Property<string>("WaybackUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("FilterListId");
|
||||
|
||||
b.ToTable("snapshots");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Software", b =>
|
||||
{
|
||||
b.Property<short>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("SMALLINT")
|
||||
.HasAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
b.Property<DateTime?>("CreatedDateUtc")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("current_timestamp()");
|
||||
|
||||
b.Property<string>("DownloadUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("HomeUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("IsAbpSubscribable");
|
||||
|
||||
b.Property<DateTime?>("ModifiedDateUtc")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("current_timestamp() ON UPDATE current_timestamp()");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("VARCHAR(126)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("software");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Syntax", b =>
|
||||
{
|
||||
b.Property<short>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("SMALLINT")
|
||||
.HasAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
b.Property<DateTime?>("CreatedDateUtc")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("current_timestamp()");
|
||||
|
||||
b.Property<string>("DefinitionUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime?>("ModifiedDateUtc")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("current_timestamp() ON UPDATE current_timestamp()");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("VARCHAR(126)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("syntaxes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Tag", b =>
|
||||
{
|
||||
b.Property<short>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("SMALLINT")
|
||||
.HasAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
b.Property<DateTime?>("CreatedDateUtc")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("current_timestamp()");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime?>("ModifiedDateUtc")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("current_timestamp() ON UPDATE current_timestamp()");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("VARCHAR(126)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("tags");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.FilterList", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Data.Entities.License", "License")
|
||||
.WithMany("FilterLists")
|
||||
.HasForeignKey("LicenseId");
|
||||
|
||||
b.HasOne("FilterLists.Data.Entities.Syntax", "Syntax")
|
||||
.WithMany("FilterLists")
|
||||
.HasForeignKey("SyntaxId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.Dependent", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Data.Entities.FilterList", "DependencyFilterList")
|
||||
.WithMany("DependencyFilterLists")
|
||||
.HasForeignKey("DependencyFilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("FilterLists.Data.Entities.FilterList", "DependentFilterList")
|
||||
.WithMany("DependentFilterLists")
|
||||
.HasForeignKey("DependentFilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.FilterListLanguage", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Data.Entities.FilterList", "FilterList")
|
||||
.WithMany("FilterListLanguages")
|
||||
.HasForeignKey("FilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("FilterLists.Data.Entities.Language", "Language")
|
||||
.WithMany("FilterListLanguages")
|
||||
.HasForeignKey("LanguageId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.FilterListMaintainer", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Data.Entities.FilterList", "FilterList")
|
||||
.WithMany("FilterListMaintainers")
|
||||
.HasForeignKey("FilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("FilterLists.Data.Entities.Maintainer", "Maintainer")
|
||||
.WithMany("FilterListMaintainers")
|
||||
.HasForeignKey("MaintainerId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.FilterListTag", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Data.Entities.FilterList", "FilterList")
|
||||
.WithMany("FilterListTags")
|
||||
.HasForeignKey("FilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("FilterLists.Data.Entities.Tag", "Tag")
|
||||
.WithMany("FilterListTags")
|
||||
.HasForeignKey("TagId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.Fork", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Data.Entities.FilterList", "ForkFilterList")
|
||||
.WithMany("ForkFilterLists")
|
||||
.HasForeignKey("ForkFilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("FilterLists.Data.Entities.FilterList", "UpstreamFilterList")
|
||||
.WithMany("UpstreamForkFilterLists")
|
||||
.HasForeignKey("UpstreamFilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.Merge", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Data.Entities.FilterList", "MergeFilterList")
|
||||
.WithMany("MergeFilterLists")
|
||||
.HasForeignKey("MergeFilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("FilterLists.Data.Entities.FilterList", "UpstreamFilterList")
|
||||
.WithMany("UpstreamMergeFilterLists")
|
||||
.HasForeignKey("UpstreamFilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.SnapshotRule", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Data.Entities.Rule", "Rule")
|
||||
.WithMany("SnapshotRules")
|
||||
.HasForeignKey("RuleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("FilterLists.Data.Entities.Snapshot", "Snapshot")
|
||||
.WithMany("SnapshotRules")
|
||||
.HasForeignKey("SnapshotId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.SoftwareSyntax", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Data.Entities.Software", "Software")
|
||||
.WithMany("SoftwareSyntaxes")
|
||||
.HasForeignKey("SoftwareId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("FilterLists.Data.Entities.Syntax", "Syntax")
|
||||
.WithMany("SoftwareSyntaxes")
|
||||
.HasForeignKey("SyntaxId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Snapshot", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Data.Entities.FilterList", "FilterList")
|
||||
.WithMany("Snapshots")
|
||||
.HasForeignKey("FilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace FilterLists.Api.Migrations
|
||||
{
|
||||
public partial class CleanupUseSignedPrimaryKeys : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
DropFK_filterlists_languages_languages_LanguageId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_filterlists_languages_languages_LanguageId",
|
||||
"filterlists_languages",
|
||||
"LanguageId",
|
||||
"languages",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
DropFK_filterlists_languages_languages_LanguageId(migrationBuilder);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_filterlists_languages_languages_LanguageId",
|
||||
"filterlists_languages",
|
||||
"LanguageId",
|
||||
"languages",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
private static void DropFK_filterlists_languages_languages_LanguageId(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_filterlists_languages_languages_LanguageId",
|
||||
"filterlists_languages");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -21,345 +21,5 @@ public static OperationBuilder<SqlOperation> DropIndex(this MigrationBuilder mig
|
|||
throw new NotImplementedException();
|
||||
//return migrationBuilder.Sql($"CREATE INDEX index_name ON misc_info (key(10));");
|
||||
}
|
||||
|
||||
public static void DropFK_filterlists_tags_tags_TagId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_filterlists_tags_tags_TagId",
|
||||
"filterlists_tags");
|
||||
}
|
||||
|
||||
public static void AddFK_filterlists_tags_tags_TagId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_filterlists_tags_tags_TagId",
|
||||
"filterlists_tags",
|
||||
"TagId",
|
||||
"tags",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
public static void DropFK_filterlists_syntaxes_SyntaxId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_filterlists_syntaxes_SyntaxId",
|
||||
"filterlists");
|
||||
}
|
||||
|
||||
public static void AddFK_filterlists_syntaxes_SyntaxId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_filterlists_syntaxes_SyntaxId",
|
||||
"filterlists",
|
||||
"SyntaxId",
|
||||
"syntaxes",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
public static void DropFK_software_syntaxes_syntaxes_SyntaxId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_software_syntaxes_syntaxes_SyntaxId",
|
||||
"software_syntaxes");
|
||||
}
|
||||
|
||||
public static void AddFK_software_syntaxes_syntaxes_SyntaxId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_software_syntaxes_syntaxes_SyntaxId",
|
||||
"software_syntaxes",
|
||||
"SyntaxId",
|
||||
"syntaxes",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
public static void DropFK_software_syntaxes_software_SoftwareId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_software_syntaxes_software_SoftwareId",
|
||||
"software_syntaxes");
|
||||
}
|
||||
|
||||
public static void AddFK_software_syntaxes_software_SoftwareId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_software_syntaxes_software_SoftwareId",
|
||||
"software_syntaxes",
|
||||
"SoftwareId",
|
||||
"software",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
public static void DropFK_snapshots_rules_rules_RuleId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_snapshots_rules_rules_RuleId",
|
||||
"snapshots_rules");
|
||||
}
|
||||
|
||||
public static void AddFK_snapshots_rules_rules_RuleId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_snapshots_rules_rules_RuleId",
|
||||
"snapshots_rules",
|
||||
"RuleId",
|
||||
"rules",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
public static void DropFK_snapshots_rules_snapshots_SnapshotId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_snapshots_rules_snapshots_SnapshotId",
|
||||
"snapshots_rules");
|
||||
}
|
||||
|
||||
public static void AddFK_snapshots_rules_snapshots_SnapshotId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_snapshots_rules_snapshots_SnapshotId",
|
||||
"snapshots_rules",
|
||||
"SnapshotId",
|
||||
"snapshots",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
public static void DropFK_snapshots_filterlists_FilterListId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_snapshots_filterlists_FilterListId",
|
||||
"snapshots");
|
||||
}
|
||||
|
||||
public static void AddFK_snapshots_filterlists_FilterListId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_snapshots_filterlists_FilterListId",
|
||||
"snapshots",
|
||||
"FilterListId",
|
||||
"filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
public static void DropFK_merges_filterlists_UpstreamFilterListId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_merges_filterlists_UpstreamFilterListId",
|
||||
"merges");
|
||||
}
|
||||
|
||||
public static void AddFK_merges_filterlists_UpstreamFilterListId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_merges_filterlists_UpstreamFilterListId",
|
||||
"merges",
|
||||
"UpstreamFilterListId",
|
||||
"filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
public static void DropFK_merges_filterlists_MergeFilterListId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_merges_filterlists_MergeFilterListId",
|
||||
"merges");
|
||||
}
|
||||
|
||||
public static void AddFK_merges_filterlists_MergeFilterListId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_merges_filterlists_MergeFilterListId",
|
||||
"merges",
|
||||
"MergeFilterListId",
|
||||
"filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
public static void DropFK_forks_filterlists_UpstreamFilterListId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_forks_filterlists_UpstreamFilterListId",
|
||||
"forks");
|
||||
}
|
||||
|
||||
public static void AddFK_forks_filterlists_UpstreamFilterListId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_forks_filterlists_UpstreamFilterListId",
|
||||
"forks",
|
||||
"UpstreamFilterListId",
|
||||
"filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
public static void DropFK_forks_filterlists_ForkFilterListId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_forks_filterlists_ForkFilterListId",
|
||||
"forks");
|
||||
}
|
||||
|
||||
public static void AddFK_forks_filterlists_ForkFilterListId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_forks_filterlists_ForkFilterListId",
|
||||
"forks",
|
||||
"ForkFilterListId",
|
||||
"filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
public static void DropFK_filterlists_tags_filterlists_FilterListId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_filterlists_tags_filterlists_FilterListId",
|
||||
"filterlists_tags");
|
||||
}
|
||||
|
||||
public static void AddFK_filterlists_tags_filterlists_FilterListId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_filterlists_tags_filterlists_FilterListId",
|
||||
"filterlists_tags",
|
||||
"FilterListId",
|
||||
"filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
public static void DropFK_filterlists_maintainers_filterlists_FilterListId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_filterlists_maintainers_filterlists_FilterListId",
|
||||
"filterlists_maintainers");
|
||||
}
|
||||
|
||||
public static void AddFK_filterlists_maintainers_filterlists_FilterListId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_filterlists_maintainers_filterlists_FilterListId",
|
||||
"filterlists_maintainers",
|
||||
"FilterListId",
|
||||
"filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
public static void DropFK_filterlists_languages_filterlists_FilterListId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_filterlists_languages_filterlists_FilterListId",
|
||||
"filterlists_languages");
|
||||
}
|
||||
|
||||
public static void AddFK_filterlists_languages_filterlists_FilterListId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_filterlists_languages_filterlists_FilterListId",
|
||||
"filterlists_languages",
|
||||
"FilterListId",
|
||||
"filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
public static void DropFK_dependents_filterlists_DependencyFilterListId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_dependents_filterlists_DependencyFilterListId",
|
||||
"dependents");
|
||||
}
|
||||
|
||||
public static void AddFK_dependents_filterlists_DependencyFilterListId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_dependents_filterlists_DependencyFilterListId",
|
||||
"dependents",
|
||||
"DependencyFilterListId",
|
||||
"filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
public static void DropFK_dependents_filterlists_DependentFilterListId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_dependents_filterlists_DependentFilterListId",
|
||||
"dependents");
|
||||
}
|
||||
|
||||
public static void AddFK_dependents_filterlists_DependentFilterListId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_dependents_filterlists_DependentFilterListId",
|
||||
"dependents",
|
||||
"DependentFilterListId",
|
||||
"filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
public static void DropFK_filterlists_maintainers_maintainers_MaintainerId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_filterlists_maintainers_maintainers_MaintainerId",
|
||||
"filterlists_maintainers");
|
||||
}
|
||||
|
||||
public static void AddFK_filterlists_maintainers_maintainers_MaintainerId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_filterlists_maintainers_maintainers_MaintainerId",
|
||||
"filterlists_maintainers",
|
||||
"MaintainerId",
|
||||
"maintainers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
public static void DropFK_filterlists_licenses_LicenseId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_filterlists_licenses_LicenseId",
|
||||
"filterlists");
|
||||
}
|
||||
|
||||
public static void AddFK_filterlists_licenses_LicenseId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_filterlists_licenses_LicenseId",
|
||||
"filterlists",
|
||||
"LicenseId",
|
||||
"licenses",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
public static void DropFK_filterlists_languages_languages_LanguageId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
"FK_filterlists_languages_languages_LanguageId",
|
||||
"filterlists_languages");
|
||||
}
|
||||
|
||||
public static void AddFK_filterlists_languages_languages_LanguageId(this MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
"FK_filterlists_languages_languages_LanguageId",
|
||||
"filterlists_languages",
|
||||
"LanguageId",
|
||||
"languages",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue