FixVarcharNullConfig

This commit is contained in:
Collin M. Barrett 2018-02-02 07:15:24 -06:00
parent 85fc0f1448
commit 2b1ffa1018
10 changed files with 848 additions and 30 deletions

View file

@ -0,0 +1,484 @@
// <auto-generated />
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("20180202131316_FixVarcharNullConfig")]
partial class FixVarcharNullConfig
{
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<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("SMALLINT UNSIGNED");
b.Property<DateTime>("CreatedDateUtc")
.ValueGeneratedOnAdd()
.HasColumnType("TIMESTAMP");
b.Property<string>("Description")
.HasColumnType("TEXT");
b.Property<string>("DescriptionSourceUrl")
.HasColumnType("TEXT");
b.Property<DateTime?>("DiscontinuedDate");
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<int?>("LicenseId");
b.Property<DateTime>("ModifiedDateUtc")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("TIMESTAMP");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("VARCHAR(126)");
b.Property<string>("PolicyUrl")
.HasColumnType("TEXT");
b.Property<DateTime?>("ScrapedDateUtc");
b.Property<string>("SubmissionUrl")
.HasColumnType("TEXT");
b.Property<int?>("SyntaxId");
b.Property<DateTime?>("UpdatedDateUtc");
b.Property<string>("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<int>("FilterListId");
b.Property<int>("LanguageId");
b.Property<DateTime>("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<int>("FilterListId");
b.Property<int>("MaintainerId");
b.Property<DateTime>("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<int>("FilterListId");
b.Property<int>("RuleId");
b.Property<DateTime>("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<int>("ForkFilterListId");
b.Property<int>("UpstreamFilterListId");
b.Property<DateTime>("CreatedDateUtc")
.ValueGeneratedOnAdd()
.HasColumnType("TIMESTAMP");
b.HasKey("ForkFilterListId", "UpstreamFilterListId");
b.HasIndex("UpstreamFilterListId");
b.ToTable("forks");
});
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.Merge", b =>
{
b.Property<int>("MergeFilterListId");
b.Property<int>("UpstreamFilterListId");
b.Property<DateTime>("CreatedDateUtc")
.ValueGeneratedOnAdd()
.HasColumnType("TIMESTAMP");
b.HasKey("MergeFilterListId", "UpstreamFilterListId");
b.HasIndex("UpstreamFilterListId");
b.ToTable("merges");
});
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.SoftwareSyntax", b =>
{
b.Property<int>("SoftwareId");
b.Property<int>("SyntaxId");
b.Property<DateTime>("CreatedDateUtc")
.ValueGeneratedOnAdd()
.HasColumnType("TIMESTAMP");
b.HasKey("SoftwareId", "SyntaxId");
b.HasIndex("SyntaxId");
b.ToTable("software_syntaxes");
});
modelBuilder.Entity("FilterLists.Data.Entities.Language", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("SMALLINT UNSIGNED");
b.Property<DateTime>("CreatedDateUtc")
.ValueGeneratedOnAdd()
.HasColumnType("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")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("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<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("SMALLINT UNSIGNED");
b.Property<DateTime>("CreatedDateUtc")
.ValueGeneratedOnAdd()
.HasColumnType("TIMESTAMP");
b.Property<string>("DescriptionUrl")
.HasColumnType("TEXT");
b.Property<DateTime>("ModifiedDateUtc")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("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<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("SMALLINT UNSIGNED");
b.Property<DateTime>("CreatedDateUtc")
.ValueGeneratedOnAdd()
.HasColumnType("TIMESTAMP");
b.Property<string>("EmailAddress")
.ValueGeneratedOnAdd()
.HasColumnType("VARCHAR(126)")
.HasDefaultValueSql("NULL");
b.Property<string>("HomeUrl")
.HasColumnType("TEXT");
b.Property<DateTime>("ModifiedDateUtc")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("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("BIGINT UNSIGNED");
b.Property<DateTime>("CreatedDateUtc")
.ValueGeneratedOnAdd()
.HasColumnType("TIMESTAMP");
b.Property<DateTime>("ModifiedDateUtc")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("TIMESTAMP");
b.Property<string>("Raw")
.IsRequired()
.HasColumnType("VARCHAR(8192)");
b.HasKey("Id");
b.ToTable("rules");
});
modelBuilder.Entity("FilterLists.Data.Entities.Software", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("SMALLINT UNSIGNED");
b.Property<DateTime>("CreatedDateUtc")
.ValueGeneratedOnAdd()
.HasColumnType("TIMESTAMP");
b.Property<string>("DownloadUrl")
.HasColumnType("TEXT");
b.Property<string>("HomeUrl")
.HasColumnType("TEXT");
b.Property<DateTime>("ModifiedDateUtc")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("TIMESTAMP");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("VARCHAR(126)");
b.HasKey("Id");
b.ToTable("software");
});
modelBuilder.Entity("FilterLists.Data.Entities.Syntax", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("SMALLINT UNSIGNED");
b.Property<DateTime>("CreatedDateUtc")
.ValueGeneratedOnAdd()
.HasColumnType("TIMESTAMP");
b.Property<string>("DefinitionUrl")
.HasColumnType("TEXT");
b.Property<DateTime>("ModifiedDateUtc")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("TIMESTAMP");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("VARCHAR(126)");
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
}
}
}

View file

@ -0,0 +1,295 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace FilterLists.Api.Migrations
{
public partial class FixVarcharNullConfig : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
"Name",
"syntaxes",
"VARCHAR(126)",
nullable: false,
oldClrType: typeof(string),
oldType: "VARCHAR(126) NOT NULL",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
"Name",
"software",
"VARCHAR(126)",
nullable: false,
oldClrType: typeof(string),
oldType: "VARCHAR(126) NOT NULL",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
"Raw",
"rules",
"VARCHAR(8192)",
nullable: false,
oldClrType: typeof(string),
oldType: "VARCHAR(16384) NOT NULL COLLATE 'utf8_unicode_ci'",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
"TwitterHandle",
"maintainers",
"VARCHAR(126)",
nullable: true,
defaultValueSql: "NULL",
oldClrType: typeof(string),
oldType: "VARCHAR(126) DEFAULT NULL",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
"Name",
"maintainers",
"VARCHAR(126)",
nullable: false,
oldClrType: typeof(string),
oldType: "VARCHAR(126) NOT NULL",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
"EmailAddress",
"maintainers",
"VARCHAR(126)",
nullable: true,
defaultValueSql: "NULL",
oldClrType: typeof(string),
oldType: "VARCHAR(126) DEFAULT NULL",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
"Name",
"licenses",
"VARCHAR(126)",
nullable: false,
oldClrType: typeof(string),
oldType: "VARCHAR(126) NOT NULL",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
"Name",
"languages",
"VARCHAR(126)",
nullable: true,
defaultValueSql: "NULL",
oldClrType: typeof(string),
oldType: "VARCHAR(126) DEFAULT NULL",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
"LocalName",
"languages",
"VARCHAR(126)",
nullable: true,
defaultValueSql: "NULL",
oldClrType: typeof(string),
oldType: "VARCHAR(126) DEFAULT NULL",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
"Iso6393",
"languages",
"VARCHAR(3)",
nullable: true,
defaultValueSql: "NULL",
oldClrType: typeof(string),
oldType: "VARCHAR(3) DEFAULT NULL",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
"Iso6392T",
"languages",
"VARCHAR(3)",
nullable: true,
defaultValueSql: "NULL",
oldClrType: typeof(string),
oldType: "VARCHAR(3) DEFAULT NULL",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
"Iso6392B",
"languages",
"VARCHAR(3)",
nullable: true,
defaultValueSql: "NULL",
oldClrType: typeof(string),
oldType: "VARCHAR(3) DEFAULT NULL",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
"Iso6392",
"languages",
"VARCHAR(3)",
nullable: true,
defaultValueSql: "NULL",
oldClrType: typeof(string),
oldType: "VARCHAR(3) DEFAULT NULL",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
"Iso6391",
"languages",
"VARCHAR(2)",
nullable: true,
defaultValueSql: "NULL",
oldClrType: typeof(string),
oldType: "VARCHAR(2) DEFAULT NULL",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
"Name",
"filterlists",
"VARCHAR(126)",
nullable: false,
oldClrType: typeof(string),
oldType: "VARCHAR(126) NOT NULL",
oldNullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
"Name",
"syntaxes",
"VARCHAR(126) NOT NULL",
nullable: true,
oldClrType: typeof(string),
oldType: "VARCHAR(126)");
migrationBuilder.AlterColumn<string>(
"Name",
"software",
"VARCHAR(126) NOT NULL",
nullable: true,
oldClrType: typeof(string),
oldType: "VARCHAR(126)");
migrationBuilder.AlterColumn<string>(
"Raw",
"rules",
"VARCHAR(16384) NOT NULL COLLATE 'utf8_unicode_ci'",
nullable: true,
oldClrType: typeof(string),
oldType: "VARCHAR(8192)");
migrationBuilder.AlterColumn<string>(
"TwitterHandle",
"maintainers",
"VARCHAR(126) DEFAULT NULL",
nullable: true,
oldClrType: typeof(string),
oldType: "VARCHAR(126)",
oldNullable: true,
oldDefaultValueSql: "NULL");
migrationBuilder.AlterColumn<string>(
"Name",
"maintainers",
"VARCHAR(126) NOT NULL",
nullable: true,
oldClrType: typeof(string),
oldType: "VARCHAR(126)");
migrationBuilder.AlterColumn<string>(
"EmailAddress",
"maintainers",
"VARCHAR(126) DEFAULT NULL",
nullable: true,
oldClrType: typeof(string),
oldType: "VARCHAR(126)",
oldNullable: true,
oldDefaultValueSql: "NULL");
migrationBuilder.AlterColumn<string>(
"Name",
"licenses",
"VARCHAR(126) NOT NULL",
nullable: true,
oldClrType: typeof(string),
oldType: "VARCHAR(126)");
migrationBuilder.AlterColumn<string>(
"Name",
"languages",
"VARCHAR(126) DEFAULT NULL",
nullable: true,
oldClrType: typeof(string),
oldType: "VARCHAR(126)",
oldNullable: true,
oldDefaultValueSql: "NULL");
migrationBuilder.AlterColumn<string>(
"LocalName",
"languages",
"VARCHAR(126) DEFAULT NULL",
nullable: true,
oldClrType: typeof(string),
oldType: "VARCHAR(126)",
oldNullable: true,
oldDefaultValueSql: "NULL");
migrationBuilder.AlterColumn<string>(
"Iso6393",
"languages",
"VARCHAR(3) DEFAULT NULL",
nullable: true,
oldClrType: typeof(string),
oldType: "VARCHAR(3)",
oldNullable: true,
oldDefaultValueSql: "NULL");
migrationBuilder.AlterColumn<string>(
"Iso6392T",
"languages",
"VARCHAR(3) DEFAULT NULL",
nullable: true,
oldClrType: typeof(string),
oldType: "VARCHAR(3)",
oldNullable: true,
oldDefaultValueSql: "NULL");
migrationBuilder.AlterColumn<string>(
"Iso6392B",
"languages",
"VARCHAR(3) DEFAULT NULL",
nullable: true,
oldClrType: typeof(string),
oldType: "VARCHAR(3)",
oldNullable: true,
oldDefaultValueSql: "NULL");
migrationBuilder.AlterColumn<string>(
"Iso6392",
"languages",
"VARCHAR(3) DEFAULT NULL",
nullable: true,
oldClrType: typeof(string),
oldType: "VARCHAR(3)",
oldNullable: true,
oldDefaultValueSql: "NULL");
migrationBuilder.AlterColumn<string>(
"Iso6391",
"languages",
"VARCHAR(2) DEFAULT NULL",
nullable: true,
oldClrType: typeof(string),
oldType: "VARCHAR(2)",
oldNullable: true,
oldDefaultValueSql: "NULL");
migrationBuilder.AlterColumn<string>(
"Name",
"filterlists",
"VARCHAR(126) NOT NULL",
nullable: true,
oldClrType: typeof(string),
oldType: "VARCHAR(126)");
}
}
}

View file

@ -60,7 +60,8 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.HasColumnType("TIMESTAMP");
b.Property<string>("Name")
.HasColumnType("VARCHAR(126) NOT NULL");
.IsRequired()
.HasColumnType("VARCHAR(126)");
b.Property<string>("PolicyUrl")
.HasColumnType("TEXT");
@ -199,29 +200,43 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.HasColumnType("TIMESTAMP");
b.Property<string>("Iso6391")
.HasColumnType("VARCHAR(2) DEFAULT NULL");
.ValueGeneratedOnAdd()
.HasColumnType("VARCHAR(2)")
.HasDefaultValueSql("NULL");
b.Property<string>("Iso6392")
.HasColumnType("VARCHAR(3) DEFAULT NULL");
.ValueGeneratedOnAdd()
.HasColumnType("VARCHAR(3)")
.HasDefaultValueSql("NULL");
b.Property<string>("Iso6392B")
.HasColumnType("VARCHAR(3) DEFAULT NULL");
.ValueGeneratedOnAdd()
.HasColumnType("VARCHAR(3)")
.HasDefaultValueSql("NULL");
b.Property<string>("Iso6392T")
.HasColumnType("VARCHAR(3) DEFAULT NULL");
.ValueGeneratedOnAdd()
.HasColumnType("VARCHAR(3)")
.HasDefaultValueSql("NULL");
b.Property<string>("Iso6393")
.HasColumnType("VARCHAR(3) DEFAULT NULL");
.ValueGeneratedOnAdd()
.HasColumnType("VARCHAR(3)")
.HasDefaultValueSql("NULL");
b.Property<string>("LocalName")
.HasColumnType("VARCHAR(126) DEFAULT NULL");
.ValueGeneratedOnAdd()
.HasColumnType("VARCHAR(126)")
.HasDefaultValueSql("NULL");
b.Property<DateTime>("ModifiedDateUtc")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("TIMESTAMP");
b.Property<string>("Name")
.HasColumnType("VARCHAR(126) DEFAULT NULL");
.ValueGeneratedOnAdd()
.HasColumnType("VARCHAR(126)")
.HasDefaultValueSql("NULL");
b.HasKey("Id");
@ -246,7 +261,8 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.HasColumnType("TIMESTAMP");
b.Property<string>("Name")
.HasColumnType("VARCHAR(126) NOT NULL");
.IsRequired()
.HasColumnType("VARCHAR(126)");
b.Property<bool>("PermissiveAdaptation");
@ -268,7 +284,9 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.HasColumnType("TIMESTAMP");
b.Property<string>("EmailAddress")
.HasColumnType("VARCHAR(126) DEFAULT NULL");
.ValueGeneratedOnAdd()
.HasColumnType("VARCHAR(126)")
.HasDefaultValueSql("NULL");
b.Property<string>("HomeUrl")
.HasColumnType("TEXT");
@ -278,10 +296,13 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.HasColumnType("TIMESTAMP");
b.Property<string>("Name")
.HasColumnType("VARCHAR(126) NOT NULL");
.IsRequired()
.HasColumnType("VARCHAR(126)");
b.Property<string>("TwitterHandle")
.HasColumnType("VARCHAR(126) DEFAULT NULL");
.ValueGeneratedOnAdd()
.HasColumnType("VARCHAR(126)")
.HasDefaultValueSql("NULL");
b.HasKey("Id");
@ -303,7 +324,8 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.HasColumnType("TIMESTAMP");
b.Property<string>("Raw")
.HasColumnType("VARCHAR(16384) NOT NULL COLLATE 'utf8_unicode_ci'");
.IsRequired()
.HasColumnType("VARCHAR(8192)");
b.HasKey("Id");
@ -331,7 +353,8 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.HasColumnType("TIMESTAMP");
b.Property<string>("Name")
.HasColumnType("VARCHAR(126) NOT NULL");
.IsRequired()
.HasColumnType("VARCHAR(126)");
b.HasKey("Id");
@ -356,7 +379,8 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.HasColumnType("TIMESTAMP");
b.Property<string>("Name")
.HasColumnType("VARCHAR(126) NOT NULL");
.IsRequired()
.HasColumnType("VARCHAR(126)");
b.HasKey("Id");

View file

@ -28,7 +28,8 @@ public override void Configure(EntityTypeBuilder<FilterList> entityTypeBuilder)
entityTypeBuilder.Property(x => x.IssuesUrl)
.HasColumnType("TEXT");
entityTypeBuilder.Property(x => x.Name)
.HasColumnType("VARCHAR(126) NOT NULL");
.HasColumnType("VARCHAR(126)")
.IsRequired();
entityTypeBuilder.Property(x => x.PolicyUrl)
.HasColumnType("TEXT");
entityTypeBuilder.Property(x => x.SubmissionUrl)

View file

@ -13,19 +13,26 @@ public override void Configure(EntityTypeBuilder<Language> entityTypeBuilder)
entityTypeBuilder.ToTable("languages");
entityTypeBuilder.Property(x => x.Iso6391)
.HasColumnType("VARCHAR(2) DEFAULT NULL");
.HasColumnType("VARCHAR(2)")
.HasDefaultValueSql("NULL");
entityTypeBuilder.Property(x => x.Iso6392)
.HasColumnType("VARCHAR(3) DEFAULT NULL");
.HasColumnType("VARCHAR(3)")
.HasDefaultValueSql("NULL");
entityTypeBuilder.Property(x => x.Iso6392B)
.HasColumnType("VARCHAR(3) DEFAULT NULL");
.HasColumnType("VARCHAR(3)")
.HasDefaultValueSql("NULL");
entityTypeBuilder.Property(x => x.Iso6392T)
.HasColumnType("VARCHAR(3) DEFAULT NULL");
.HasColumnType("VARCHAR(3)")
.HasDefaultValueSql("NULL");
entityTypeBuilder.Property(x => x.Iso6393)
.HasColumnType("VARCHAR(3) DEFAULT NULL");
.HasColumnType("VARCHAR(3)")
.HasDefaultValueSql("NULL");
entityTypeBuilder.Property(x => x.LocalName)
.HasColumnType("VARCHAR(126) DEFAULT NULL");
.HasColumnType("VARCHAR(126)")
.HasDefaultValueSql("NULL");
entityTypeBuilder.Property(x => x.Name)
.HasColumnType("VARCHAR(126) DEFAULT NULL");
.HasColumnType("VARCHAR(126)")
.HasDefaultValueSql("NULL");
}
}
}

View file

@ -15,7 +15,8 @@ public override void Configure(EntityTypeBuilder<License> entityTypeBuilder)
entityTypeBuilder.Property(x => x.DescriptionUrl)
.HasColumnType("TEXT");
entityTypeBuilder.Property(x => x.Name)
.HasColumnType("VARCHAR(126) NOT NULL");
.HasColumnType("VARCHAR(126)")
.IsRequired();
}
}
}

View file

@ -13,13 +13,16 @@ public override void Configure(EntityTypeBuilder<Maintainer> entityTypeBuilder)
entityTypeBuilder.ToTable("maintainers");
entityTypeBuilder.Property(x => x.EmailAddress)
.HasColumnType("VARCHAR(126) DEFAULT NULL");
.HasColumnType("VARCHAR(126)")
.HasDefaultValueSql("NULL");
entityTypeBuilder.Property(x => x.HomeUrl)
.HasColumnType("TEXT");
entityTypeBuilder.Property(x => x.Name)
.HasColumnType("VARCHAR(126) NOT NULL");
.HasColumnType("VARCHAR(126)")
.IsRequired();
entityTypeBuilder.Property(x => x.TwitterHandle)
.HasColumnType("VARCHAR(126) DEFAULT NULL");
.HasColumnType("VARCHAR(126)")
.HasDefaultValueSql("NULL"); ;
}
}
}

View file

@ -16,7 +16,8 @@ public override void Configure(EntityTypeBuilder<Rule> entityTypeBuilder)
.HasColumnType("BIGINT UNSIGNED");
entityTypeBuilder.Property(x => x.Raw)
.HasColumnType("VARCHAR(16384) NOT NULL COLLATE 'utf8_unicode_ci'");
.HasColumnType("VARCHAR(8192)")
.IsRequired();
}
}
}

View file

@ -17,7 +17,8 @@ public override void Configure(EntityTypeBuilder<Software> entityTypeBuilder)
entityTypeBuilder.Property(x => x.HomeUrl)
.HasColumnType("TEXT");
entityTypeBuilder.Property(x => x.Name)
.HasColumnType("VARCHAR(126) NOT NULL");
.HasColumnType("VARCHAR(126)")
.IsRequired();
}
}
}

View file

@ -15,7 +15,8 @@ public override void Configure(EntityTypeBuilder<Syntax> entityTypeBuilder)
entityTypeBuilder.Property(x => x.DefinitionUrl)
.HasColumnType("TEXT");
entityTypeBuilder.Property(x => x.Name)
.HasColumnType("VARCHAR(126) NOT NULL");
.HasColumnType("VARCHAR(126)")
.IsRequired();
}
}
}