diff --git a/src/FilterLists.Api/Migrations/20180130170852_TweakVarcharCollationAndWidenRuleRaw.Designer.cs b/src/FilterLists.Api/Migrations/20180130170852_TweakVarcharCollationAndWidenRuleRaw.Designer.cs new file mode 100644 index 000000000..04d1196cf --- /dev/null +++ b/src/FilterLists.Api/Migrations/20180130170852_TweakVarcharCollationAndWidenRuleRaw.Designer.cs @@ -0,0 +1,455 @@ +// +using FilterLists.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.EntityFrameworkCore.Storage.Internal; +using System; + +namespace FilterLists.Api.Migrations +{ + [DbContext(typeof(FilterListsDbContext))] + [Migration("20180130170852_TweakVarcharCollationAndWidenRuleRaw")] + partial class TweakVarcharCollationAndWidenRuleRaw + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn) + .HasAnnotation("ProductVersion", "2.0.1-rtm-125"); + + modelBuilder.Entity("FilterLists.Data.Entities.FilterList", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("SMALLINT UNSIGNED"); + + b.Property("CreatedDateUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TIMESTAMP"); + + b.Property("Description") + .HasColumnType("TEXT"); + + b.Property("DescriptionSourceUrl") + .HasColumnType("TEXT"); + + b.Property("DiscontinuedDate"); + + b.Property("DonateUrl") + .HasColumnType("TEXT"); + + b.Property("EmailAddress") + .HasColumnType("VARCHAR(126)"); + + b.Property("ForumUrl") + .HasColumnType("TEXT"); + + b.Property("HomeUrl") + .HasColumnType("TEXT"); + + b.Property("IssuesUrl") + .HasColumnType("TEXT"); + + b.Property("LicenseId"); + + b.Property("ModifiedDateUtc") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("TIMESTAMP"); + + b.Property("Name") + .HasColumnType("VARCHAR(126) NOT NULL"); + + b.Property("ScrapedDateUtc"); + + b.Property("SubmissionUrl") + .HasColumnType("TEXT"); + + b.Property("SyntaxId"); + + b.Property("UpdatedDateUtc"); + + b.Property("ViewUrl") + .HasColumnType("TEXT NOT NULL"); + + b.HasKey("Id"); + + b.HasIndex("LicenseId"); + + b.HasIndex("SyntaxId"); + + b.ToTable("filterlists"); + }); + + modelBuilder.Entity("FilterLists.Data.Entities.Junctions.FilterListLanguage", b => + { + b.Property("FilterListId"); + + b.Property("LanguageId"); + + b.Property("CreatedDateUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TIMESTAMP"); + + b.HasKey("FilterListId", "LanguageId"); + + b.HasIndex("LanguageId"); + + b.ToTable("filterlists_languages"); + }); + + modelBuilder.Entity("FilterLists.Data.Entities.Junctions.FilterListMaintainer", b => + { + b.Property("FilterListId"); + + b.Property("MaintainerId"); + + b.Property("CreatedDateUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TIMESTAMP"); + + b.HasKey("FilterListId", "MaintainerId"); + + b.HasIndex("MaintainerId"); + + b.ToTable("filterlists_maintainers"); + }); + + modelBuilder.Entity("FilterLists.Data.Entities.Junctions.FilterListRule", b => + { + b.Property("FilterListId"); + + b.Property("RuleId"); + + b.Property("CreatedDateUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TIMESTAMP"); + + b.HasKey("FilterListId", "RuleId"); + + b.HasIndex("RuleId"); + + b.ToTable("filterlists_rules"); + }); + + modelBuilder.Entity("FilterLists.Data.Entities.Junctions.Fork", b => + { + b.Property("ForkFilterListId"); + + b.Property("UpstreamFilterListId"); + + b.Property("CreatedDateUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TIMESTAMP"); + + b.HasKey("ForkFilterListId", "UpstreamFilterListId"); + + b.HasIndex("UpstreamFilterListId"); + + b.ToTable("forks"); + }); + + modelBuilder.Entity("FilterLists.Data.Entities.Junctions.Merge", b => + { + b.Property("MergeFilterListId"); + + b.Property("UpstreamFilterListId"); + + b.Property("CreatedDateUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TIMESTAMP"); + + b.HasKey("MergeFilterListId", "UpstreamFilterListId"); + + b.HasIndex("UpstreamFilterListId"); + + b.ToTable("merges"); + }); + + modelBuilder.Entity("FilterLists.Data.Entities.Junctions.SoftwareSyntax", b => + { + b.Property("SoftwareId"); + + b.Property("SyntaxId"); + + b.Property("CreatedDateUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TIMESTAMP"); + + b.HasKey("SoftwareId", "SyntaxId"); + + b.HasIndex("SyntaxId"); + + b.ToTable("software_syntaxes"); + }); + + modelBuilder.Entity("FilterLists.Data.Entities.Language", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("SMALLINT UNSIGNED"); + + b.Property("CreatedDateUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TIMESTAMP"); + + b.Property("Iso6391") + .HasColumnType("VARCHAR(2)"); + + b.Property("Iso6392") + .HasColumnType("VARCHAR(3)"); + + b.Property("Iso6392B") + .HasColumnType("VARCHAR(3)"); + + b.Property("Iso6392T") + .HasColumnType("VARCHAR(3)"); + + b.Property("Iso6393") + .HasColumnType("VARCHAR(3)"); + + b.Property("LocalName") + .HasColumnType("VARCHAR(126)"); + + b.Property("ModifiedDateUtc") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("TIMESTAMP"); + + b.Property("Name") + .HasColumnType("VARCHAR(126)"); + + b.HasKey("Id"); + + b.ToTable("languages"); + }); + + modelBuilder.Entity("FilterLists.Data.Entities.License", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("SMALLINT UNSIGNED"); + + b.Property("CreatedDateUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TIMESTAMP"); + + b.Property("DescriptionUrl") + .HasColumnType("TEXT"); + + b.Property("ModifiedDateUtc") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("TIMESTAMP"); + + b.Property("Name") + .HasColumnType("VARCHAR(126) NOT NULL"); + + b.Property("PermissiveAdaptation"); + + b.Property("PermissiveCommercial"); + + b.HasKey("Id"); + + b.ToTable("licenses"); + }); + + modelBuilder.Entity("FilterLists.Data.Entities.Maintainer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("SMALLINT UNSIGNED"); + + b.Property("CreatedDateUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TIMESTAMP"); + + b.Property("EmailAddress") + .HasColumnType("VARCHAR(126)"); + + b.Property("HomeUrl") + .HasColumnType("TEXT"); + + b.Property("ModifiedDateUtc") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("TIMESTAMP"); + + b.Property("Name") + .HasColumnType("VARCHAR(126) NOT NULL"); + + b.Property("TwitterHandle") + .HasColumnType("VARCHAR(126)"); + + b.HasKey("Id"); + + b.ToTable("maintainers"); + }); + + modelBuilder.Entity("FilterLists.Data.Entities.Rule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("BIGINT UNSIGNED"); + + b.Property("CreatedDateUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TIMESTAMP"); + + b.Property("ModifiedDateUtc") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("TIMESTAMP"); + + b.Property("Raw") + .HasColumnType("VARCHAR(16384) NOT NULL COLLATE 'utf8_unicode_ci'"); + + b.HasKey("Id"); + + b.ToTable("rules"); + }); + + modelBuilder.Entity("FilterLists.Data.Entities.Software", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("SMALLINT UNSIGNED"); + + b.Property("CreatedDateUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TIMESTAMP"); + + b.Property("DownloadUrl") + .HasColumnType("TEXT"); + + b.Property("HomeUrl") + .HasColumnType("TEXT"); + + b.Property("ModifiedDateUtc") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("TIMESTAMP"); + + b.Property("Name") + .HasColumnType("VARCHAR(126) NOT NULL"); + + b.HasKey("Id"); + + b.ToTable("software"); + }); + + modelBuilder.Entity("FilterLists.Data.Entities.Syntax", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("SMALLINT UNSIGNED"); + + b.Property("CreatedDateUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TIMESTAMP"); + + b.Property("DefinitionUrl") + .HasColumnType("TEXT"); + + b.Property("ModifiedDateUtc") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("TIMESTAMP"); + + b.Property("Name") + .HasColumnType("VARCHAR(126) NOT NULL"); + + b.HasKey("Id"); + + b.ToTable("syntaxes"); + }); + + modelBuilder.Entity("FilterLists.Data.Entities.FilterList", b => + { + b.HasOne("FilterLists.Data.Entities.License") + .WithMany("FilterLists") + .HasForeignKey("LicenseId"); + + b.HasOne("FilterLists.Data.Entities.Syntax") + .WithMany("FilterLists") + .HasForeignKey("SyntaxId"); + }); + + 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.FilterListRule", b => + { + b.HasOne("FilterLists.Data.Entities.FilterList", "FilterList") + .WithMany("FilterListRules") + .HasForeignKey("FilterListId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("FilterLists.Data.Entities.Rule", "Rule") + .WithMany("FilterListRules") + .HasForeignKey("RuleId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("FilterLists.Data.Entities.Junctions.Fork", b => + { + b.HasOne("FilterLists.Data.Entities.FilterList", "ForkFilterList") + .WithMany() + .HasForeignKey("ForkFilterListId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("FilterLists.Data.Entities.FilterList", "UpstreamFilterList") + .WithMany() + .HasForeignKey("UpstreamFilterListId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("FilterLists.Data.Entities.Junctions.Merge", b => + { + b.HasOne("FilterLists.Data.Entities.FilterList", "MergeFilterList") + .WithMany() + .HasForeignKey("MergeFilterListId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("FilterLists.Data.Entities.FilterList", "UpstreamFilterList") + .WithMany() + .HasForeignKey("UpstreamFilterListId") + .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); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/FilterLists.Api/Migrations/20180130170852_TweakVarcharCollationAndWidenRuleRaw.cs b/src/FilterLists.Api/Migrations/20180130170852_TweakVarcharCollationAndWidenRuleRaw.cs new file mode 100644 index 000000000..c6c05e325 --- /dev/null +++ b/src/FilterLists.Api/Migrations/20180130170852_TweakVarcharCollationAndWidenRuleRaw.cs @@ -0,0 +1,303 @@ +using Microsoft.EntityFrameworkCore.Migrations; +using System; +using System.Collections.Generic; + +namespace FilterLists.Api.Migrations +{ + public partial class TweakVarcharCollationAndWidenRuleRaw : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Name", + table: "syntaxes", + type: "VARCHAR(126) NOT NULL", + nullable: true, + oldClrType: typeof(string), + oldType: "NVARCHAR(126) NOT NULL", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Name", + table: "software", + type: "VARCHAR(126) NOT NULL", + nullable: true, + oldClrType: typeof(string), + oldType: "NVARCHAR(126) NOT NULL", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Raw", + table: "rules", + type: "VARCHAR(16384) NOT NULL COLLATE 'utf8_unicode_ci'", + nullable: true, + oldClrType: typeof(string), + oldType: "NVARCHAR(2083) NOT NULL", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "TwitterHandle", + table: "maintainers", + type: "VARCHAR(126)", + nullable: true, + oldClrType: typeof(string), + oldType: "NVARCHAR(126)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Name", + table: "maintainers", + type: "VARCHAR(126) NOT NULL", + nullable: true, + oldClrType: typeof(string), + oldType: "NVARCHAR(126) NOT NULL", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "EmailAddress", + table: "maintainers", + type: "VARCHAR(126)", + nullable: true, + oldClrType: typeof(string), + oldType: "NVARCHAR(126)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Name", + table: "licenses", + type: "VARCHAR(126) NOT NULL", + nullable: true, + oldClrType: typeof(string), + oldType: "NVARCHAR(126) NOT NULL", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Name", + table: "languages", + type: "VARCHAR(126)", + nullable: true, + oldClrType: typeof(string), + oldType: "NVARCHAR(126)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "LocalName", + table: "languages", + type: "VARCHAR(126)", + nullable: true, + oldClrType: typeof(string), + oldType: "NVARCHAR(126)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Iso6393", + table: "languages", + type: "VARCHAR(3)", + nullable: true, + oldClrType: typeof(string), + oldType: "NVARCHAR(3)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Iso6392T", + table: "languages", + type: "VARCHAR(3)", + nullable: true, + oldClrType: typeof(string), + oldType: "NVARCHAR(3)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Iso6392B", + table: "languages", + type: "VARCHAR(3)", + nullable: true, + oldClrType: typeof(string), + oldType: "NVARCHAR(3)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Iso6392", + table: "languages", + type: "VARCHAR(3)", + nullable: true, + oldClrType: typeof(string), + oldType: "NVARCHAR(3)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Iso6391", + table: "languages", + type: "VARCHAR(2)", + nullable: true, + oldClrType: typeof(string), + oldType: "NVARCHAR(2)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Name", + table: "filterlists", + type: "VARCHAR(126) NOT NULL", + nullable: true, + oldClrType: typeof(string), + oldType: "NVARCHAR(126) NOT NULL", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "EmailAddress", + table: "filterlists", + type: "VARCHAR(126)", + nullable: true, + oldClrType: typeof(string), + oldType: "NVARCHAR(126)", + oldNullable: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Name", + table: "syntaxes", + type: "NVARCHAR(126) NOT NULL", + nullable: true, + oldClrType: typeof(string), + oldType: "VARCHAR(126) NOT NULL", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Name", + table: "software", + type: "NVARCHAR(126) NOT NULL", + nullable: true, + oldClrType: typeof(string), + oldType: "VARCHAR(126) NOT NULL", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Raw", + table: "rules", + type: "NVARCHAR(2083) NOT NULL", + nullable: true, + oldClrType: typeof(string), + oldType: "VARCHAR(16384) NOT NULL COLLATE 'utf8_unicode_ci'", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "TwitterHandle", + table: "maintainers", + type: "NVARCHAR(126)", + nullable: true, + oldClrType: typeof(string), + oldType: "VARCHAR(126)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Name", + table: "maintainers", + type: "NVARCHAR(126) NOT NULL", + nullable: true, + oldClrType: typeof(string), + oldType: "VARCHAR(126) NOT NULL", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "EmailAddress", + table: "maintainers", + type: "NVARCHAR(126)", + nullable: true, + oldClrType: typeof(string), + oldType: "VARCHAR(126)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Name", + table: "licenses", + type: "NVARCHAR(126) NOT NULL", + nullable: true, + oldClrType: typeof(string), + oldType: "VARCHAR(126) NOT NULL", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Name", + table: "languages", + type: "NVARCHAR(126)", + nullable: true, + oldClrType: typeof(string), + oldType: "VARCHAR(126)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "LocalName", + table: "languages", + type: "NVARCHAR(126)", + nullable: true, + oldClrType: typeof(string), + oldType: "VARCHAR(126)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Iso6393", + table: "languages", + type: "NVARCHAR(3)", + nullable: true, + oldClrType: typeof(string), + oldType: "VARCHAR(3)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Iso6392T", + table: "languages", + type: "NVARCHAR(3)", + nullable: true, + oldClrType: typeof(string), + oldType: "VARCHAR(3)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Iso6392B", + table: "languages", + type: "NVARCHAR(3)", + nullable: true, + oldClrType: typeof(string), + oldType: "VARCHAR(3)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Iso6392", + table: "languages", + type: "NVARCHAR(3)", + nullable: true, + oldClrType: typeof(string), + oldType: "VARCHAR(3)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Iso6391", + table: "languages", + type: "NVARCHAR(2)", + nullable: true, + oldClrType: typeof(string), + oldType: "VARCHAR(2)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Name", + table: "filterlists", + type: "NVARCHAR(126) NOT NULL", + nullable: true, + oldClrType: typeof(string), + oldType: "VARCHAR(126) NOT NULL", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "EmailAddress", + table: "filterlists", + type: "NVARCHAR(126)", + nullable: true, + oldClrType: typeof(string), + oldType: "VARCHAR(126)", + oldNullable: true); + } + } +} diff --git a/src/FilterLists.Api/Migrations/FilterListsDbContextModelSnapshot.cs b/src/FilterLists.Api/Migrations/FilterListsDbContextModelSnapshot.cs index ff0ef9969..c52cbfcc0 100644 --- a/src/FilterLists.Api/Migrations/FilterListsDbContextModelSnapshot.cs +++ b/src/FilterLists.Api/Migrations/FilterListsDbContextModelSnapshot.cs @@ -42,7 +42,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("TEXT"); b.Property("EmailAddress") - .HasColumnType("NVARCHAR(126)"); + .HasColumnType("VARCHAR(126)"); b.Property("ForumUrl") .HasColumnType("TEXT"); @@ -60,7 +60,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("TIMESTAMP"); b.Property("Name") - .HasColumnType("NVARCHAR(126) NOT NULL"); + .HasColumnType("VARCHAR(126) NOT NULL"); b.Property("ScrapedDateUtc"); @@ -196,29 +196,29 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("TIMESTAMP"); b.Property("Iso6391") - .HasColumnType("NVARCHAR(2)"); + .HasColumnType("VARCHAR(2)"); b.Property("Iso6392") - .HasColumnType("NVARCHAR(3)"); + .HasColumnType("VARCHAR(3)"); b.Property("Iso6392B") - .HasColumnType("NVARCHAR(3)"); + .HasColumnType("VARCHAR(3)"); b.Property("Iso6392T") - .HasColumnType("NVARCHAR(3)"); + .HasColumnType("VARCHAR(3)"); b.Property("Iso6393") - .HasColumnType("NVARCHAR(3)"); + .HasColumnType("VARCHAR(3)"); b.Property("LocalName") - .HasColumnType("NVARCHAR(126)"); + .HasColumnType("VARCHAR(126)"); b.Property("ModifiedDateUtc") .ValueGeneratedOnAddOrUpdate() .HasColumnType("TIMESTAMP"); b.Property("Name") - .HasColumnType("NVARCHAR(126)"); + .HasColumnType("VARCHAR(126)"); b.HasKey("Id"); @@ -243,7 +243,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("TIMESTAMP"); b.Property("Name") - .HasColumnType("NVARCHAR(126) NOT NULL"); + .HasColumnType("VARCHAR(126) NOT NULL"); b.Property("PermissiveAdaptation"); @@ -265,7 +265,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("TIMESTAMP"); b.Property("EmailAddress") - .HasColumnType("NVARCHAR(126)"); + .HasColumnType("VARCHAR(126)"); b.Property("HomeUrl") .HasColumnType("TEXT"); @@ -275,10 +275,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("TIMESTAMP"); b.Property("Name") - .HasColumnType("NVARCHAR(126) NOT NULL"); + .HasColumnType("VARCHAR(126) NOT NULL"); b.Property("TwitterHandle") - .HasColumnType("NVARCHAR(126)"); + .HasColumnType("VARCHAR(126)"); b.HasKey("Id"); @@ -300,7 +300,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("TIMESTAMP"); b.Property("Raw") - .HasColumnType("NVARCHAR(2083) NOT NULL"); + .HasColumnType("VARCHAR(16384) NOT NULL COLLATE 'utf8_unicode_ci'"); b.HasKey("Id"); @@ -328,7 +328,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("TIMESTAMP"); b.Property("Name") - .HasColumnType("NVARCHAR(126) NOT NULL"); + .HasColumnType("VARCHAR(126) NOT NULL"); b.HasKey("Id"); @@ -353,7 +353,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("TIMESTAMP"); b.Property("Name") - .HasColumnType("NVARCHAR(126) NOT NULL"); + .HasColumnType("VARCHAR(126) NOT NULL"); b.HasKey("Id"); diff --git a/src/FilterLists.Data/EntityTypeConfigurations/FilterListTypeConfiguration.cs b/src/FilterLists.Data/EntityTypeConfigurations/FilterListTypeConfiguration.cs index 903ec43cd..12215afed 100644 --- a/src/FilterLists.Data/EntityTypeConfigurations/FilterListTypeConfiguration.cs +++ b/src/FilterLists.Data/EntityTypeConfigurations/FilterListTypeConfiguration.cs @@ -19,7 +19,7 @@ public override void Configure(EntityTypeBuilder entityTypeBuilder) entityTypeBuilder.Property(x => x.DonateUrl) .HasColumnType("TEXT"); entityTypeBuilder.Property(x => x.EmailAddress) - .HasColumnType("NVARCHAR(126)"); + .HasColumnType("VARCHAR(126)"); entityTypeBuilder.Property(x => x.ForumUrl) .HasColumnType("TEXT"); entityTypeBuilder.Property(x => x.HomeUrl) @@ -27,7 +27,7 @@ public override void Configure(EntityTypeBuilder entityTypeBuilder) entityTypeBuilder.Property(x => x.IssuesUrl) .HasColumnType("TEXT"); entityTypeBuilder.Property(x => x.Name) - .HasColumnType("NVARCHAR(126) NOT NULL"); + .HasColumnType("VARCHAR(126) NOT NULL"); entityTypeBuilder.Property(x => x.SubmissionUrl) .HasColumnType("TEXT"); entityTypeBuilder.Property(x => x.ViewUrl) diff --git a/src/FilterLists.Data/EntityTypeConfigurations/LanguageTypeConfiguration.cs b/src/FilterLists.Data/EntityTypeConfigurations/LanguageTypeConfiguration.cs index d5b26c02c..74d6e7a4c 100644 --- a/src/FilterLists.Data/EntityTypeConfigurations/LanguageTypeConfiguration.cs +++ b/src/FilterLists.Data/EntityTypeConfigurations/LanguageTypeConfiguration.cs @@ -13,19 +13,19 @@ public override void Configure(EntityTypeBuilder entityTypeBuilder) entityTypeBuilder.ToTable("languages"); entityTypeBuilder.Property(x => x.Iso6391) - .HasColumnType("NVARCHAR(2)"); + .HasColumnType("VARCHAR(2)"); entityTypeBuilder.Property(x => x.Iso6392) - .HasColumnType("NVARCHAR(3)"); + .HasColumnType("VARCHAR(3)"); entityTypeBuilder.Property(x => x.Iso6392B) - .HasColumnType("NVARCHAR(3)"); + .HasColumnType("VARCHAR(3)"); entityTypeBuilder.Property(x => x.Iso6392T) - .HasColumnType("NVARCHAR(3)"); + .HasColumnType("VARCHAR(3)"); entityTypeBuilder.Property(x => x.Iso6393) - .HasColumnType("NVARCHAR(3)"); + .HasColumnType("VARCHAR(3)"); entityTypeBuilder.Property(x => x.LocalName) - .HasColumnType("NVARCHAR(126)"); + .HasColumnType("VARCHAR(126)"); entityTypeBuilder.Property(x => x.Name) - .HasColumnType("NVARCHAR(126)"); + .HasColumnType("VARCHAR(126)"); } } } \ No newline at end of file diff --git a/src/FilterLists.Data/EntityTypeConfigurations/LicenseTypeConfiguration.cs b/src/FilterLists.Data/EntityTypeConfigurations/LicenseTypeConfiguration.cs index 060d80dc5..74817d676 100644 --- a/src/FilterLists.Data/EntityTypeConfigurations/LicenseTypeConfiguration.cs +++ b/src/FilterLists.Data/EntityTypeConfigurations/LicenseTypeConfiguration.cs @@ -15,7 +15,7 @@ public override void Configure(EntityTypeBuilder entityTypeBuilder) entityTypeBuilder.Property(x => x.DescriptionUrl) .HasColumnType("TEXT"); entityTypeBuilder.Property(x => x.Name) - .HasColumnType("NVARCHAR(126) NOT NULL"); + .HasColumnType("VARCHAR(126) NOT NULL"); } } } \ No newline at end of file diff --git a/src/FilterLists.Data/EntityTypeConfigurations/MaintainerTypeConfiguration.cs b/src/FilterLists.Data/EntityTypeConfigurations/MaintainerTypeConfiguration.cs index 037645572..bafdb1148 100644 --- a/src/FilterLists.Data/EntityTypeConfigurations/MaintainerTypeConfiguration.cs +++ b/src/FilterLists.Data/EntityTypeConfigurations/MaintainerTypeConfiguration.cs @@ -13,13 +13,13 @@ public override void Configure(EntityTypeBuilder entityTypeBuilder) entityTypeBuilder.ToTable("maintainers"); entityTypeBuilder.Property(x => x.EmailAddress) - .HasColumnType("NVARCHAR(126)"); + .HasColumnType("VARCHAR(126)"); entityTypeBuilder.Property(x => x.HomeUrl) .HasColumnType("TEXT"); entityTypeBuilder.Property(x => x.Name) - .HasColumnType("NVARCHAR(126) NOT NULL"); + .HasColumnType("VARCHAR(126) NOT NULL"); entityTypeBuilder.Property(x => x.TwitterHandle) - .HasColumnType("NVARCHAR(126)"); + .HasColumnType("VARCHAR(126)"); } } } \ No newline at end of file diff --git a/src/FilterLists.Data/EntityTypeConfigurations/RuleTypeConfiguration.cs b/src/FilterLists.Data/EntityTypeConfigurations/RuleTypeConfiguration.cs index 1a32bbee4..4dd9faa53 100644 --- a/src/FilterLists.Data/EntityTypeConfigurations/RuleTypeConfiguration.cs +++ b/src/FilterLists.Data/EntityTypeConfigurations/RuleTypeConfiguration.cs @@ -16,7 +16,7 @@ public override void Configure(EntityTypeBuilder entityTypeBuilder) .HasColumnType("BIGINT UNSIGNED"); entityTypeBuilder.Property(x => x.Raw) - .HasColumnType("NVARCHAR(2083) NOT NULL"); + .HasColumnType("VARCHAR(16384) NOT NULL COLLATE 'utf8_unicode_ci'"); } } } \ No newline at end of file diff --git a/src/FilterLists.Data/EntityTypeConfigurations/SoftwareTypeConfiguration.cs b/src/FilterLists.Data/EntityTypeConfigurations/SoftwareTypeConfiguration.cs index a382e9e62..852af0e16 100644 --- a/src/FilterLists.Data/EntityTypeConfigurations/SoftwareTypeConfiguration.cs +++ b/src/FilterLists.Data/EntityTypeConfigurations/SoftwareTypeConfiguration.cs @@ -17,7 +17,7 @@ public override void Configure(EntityTypeBuilder entityTypeBuilder) entityTypeBuilder.Property(x => x.HomeUrl) .HasColumnType("TEXT"); entityTypeBuilder.Property(x => x.Name) - .HasColumnType("NVARCHAR(126) NOT NULL"); + .HasColumnType("VARCHAR(126) NOT NULL"); } } } \ No newline at end of file diff --git a/src/FilterLists.Data/EntityTypeConfigurations/SyntaxTypeConfiguration.cs b/src/FilterLists.Data/EntityTypeConfigurations/SyntaxTypeConfiguration.cs index 512543c6f..1253f09ed 100644 --- a/src/FilterLists.Data/EntityTypeConfigurations/SyntaxTypeConfiguration.cs +++ b/src/FilterLists.Data/EntityTypeConfigurations/SyntaxTypeConfiguration.cs @@ -15,7 +15,7 @@ public override void Configure(EntityTypeBuilder entityTypeBuilder) entityTypeBuilder.Property(x => x.DefinitionUrl) .HasColumnType("TEXT"); entityTypeBuilder.Property(x => x.Name) - .HasColumnType("NVARCHAR(126) NOT NULL"); + .HasColumnType("VARCHAR(126) NOT NULL"); } } } \ No newline at end of file