mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
tweak primary key data types
This commit is contained in:
parent
4ac64c1442
commit
1105be03c5
10 changed files with 1282 additions and 1272 deletions
|
|
@ -2,6 +2,8 @@
|
|||
xmlns:s="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml"
|
||||
xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:String x:Key="/Default/CodeInspection/GeneratedCode/GeneratedFileMasks/=_002A_002EDesigner_002Ecs/@EntryIndexedValue"></s:String>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/GeneratedCode/GeneratedFileMasks/=_002A_002EDesigner_002Ecs/@EntryIndexRemoved">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTILINE_CALLS_CHAIN/@EntryValue">True</s:Boolean>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_SIMPLE_EMBEDDED_STATEMENT_ON_SAME_LINE/@EntryValue">NEVER</s:String>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AFTER_TYPECAST_PARENTHESES/@EntryValue">False</s:Boolean>
|
||||
|
|
|
|||
|
|
@ -1,505 +0,0 @@
|
|||
// <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 System;
|
||||
|
||||
namespace FilterLists.Api.Migrations
|
||||
{
|
||||
[DbContext(typeof(FilterListsDbContext))]
|
||||
[Migration("20180208145019_InitialCreate")]
|
||||
partial class InitialCreate
|
||||
{
|
||||
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<string>("SubmissionUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("SyntaxId");
|
||||
|
||||
b.Property<string>("ViewUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
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", "FilterListId");
|
||||
|
||||
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", "FilterListId");
|
||||
|
||||
b.ToTable("filterlists_maintainers");
|
||||
});
|
||||
|
||||
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", "ForkFilterListId");
|
||||
|
||||
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", "MergeFilterListId");
|
||||
|
||||
b.ToTable("merges");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.SnapshotRule", b =>
|
||||
{
|
||||
b.Property<int>("SnapshotId");
|
||||
|
||||
b.Property<int>("RuleId");
|
||||
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.HasKey("SnapshotId", "RuleId");
|
||||
|
||||
b.HasIndex("RuleId", "SnapshotId");
|
||||
|
||||
b.ToTable("snapshots_rules");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.SoftwareSyntax", b =>
|
||||
{
|
||||
b.Property<int>("SyntaxId");
|
||||
|
||||
b.Property<int>("SoftwareId");
|
||||
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.HasKey("SyntaxId", "SoftwareId");
|
||||
|
||||
b.HasIndex("SoftwareId", "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<string>("Raw")
|
||||
.IsRequired()
|
||||
.HasColumnType("VARCHAR(8192)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("rules");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Snapshot", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("MEDIUMINT UNSIGNED");
|
||||
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.Property<int>("FilterListId");
|
||||
|
||||
b.Property<int?>("HttpStatusCode")
|
||||
.HasColumnType("SMALLINT UNSIGNED");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("FilterListId");
|
||||
|
||||
b.ToTable("snapshots");
|
||||
});
|
||||
|
||||
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", "License")
|
||||
.WithMany("FilterLists")
|
||||
.HasForeignKey("LicenseId");
|
||||
|
||||
b.HasOne("FilterLists.Data.Entities.Syntax", "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.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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,432 +0,0 @@
|
|||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FilterLists.Api.Migrations
|
||||
{
|
||||
public partial class InitialCreate : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "languages",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "SMALLINT UNSIGNED", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
CreatedDateUtc = table.Column<DateTime>(type: "TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Iso6391 = table.Column<string>(type: "VARCHAR(2)", nullable: true, defaultValueSql: "NULL"),
|
||||
Iso6392 = table.Column<string>(type: "VARCHAR(3)", nullable: true, defaultValueSql: "NULL"),
|
||||
Iso6392B = table.Column<string>(type: "VARCHAR(3)", nullable: true, defaultValueSql: "NULL"),
|
||||
Iso6392T = table.Column<string>(type: "VARCHAR(3)", nullable: true, defaultValueSql: "NULL"),
|
||||
Iso6393 = table.Column<string>(type: "VARCHAR(3)", nullable: true, defaultValueSql: "NULL"),
|
||||
LocalName = table.Column<string>(type: "VARCHAR(126)", nullable: true, defaultValueSql: "NULL"),
|
||||
ModifiedDateUtc = table.Column<DateTime>(type: "TIMESTAMP", nullable: false),
|
||||
Name = table.Column<string>(type: "VARCHAR(126)", nullable: true, defaultValueSql: "NULL")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_languages", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "licenses",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "SMALLINT UNSIGNED", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
CreatedDateUtc = table.Column<DateTime>(type: "TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
DescriptionUrl = table.Column<string>(type: "TEXT", nullable: true),
|
||||
ModifiedDateUtc = table.Column<DateTime>(type: "TIMESTAMP", nullable: false),
|
||||
Name = table.Column<string>(type: "VARCHAR(126)", nullable: false),
|
||||
PermissiveAdaptation = table.Column<bool>(nullable: false),
|
||||
PermissiveCommercial = table.Column<bool>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_licenses", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "maintainers",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "SMALLINT UNSIGNED", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
CreatedDateUtc = table.Column<DateTime>(type: "TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
EmailAddress = table.Column<string>(type: "VARCHAR(126)", nullable: true, defaultValueSql: "NULL"),
|
||||
HomeUrl = table.Column<string>(type: "TEXT", nullable: true),
|
||||
ModifiedDateUtc = table.Column<DateTime>(type: "TIMESTAMP", nullable: false),
|
||||
Name = table.Column<string>(type: "VARCHAR(126)", nullable: false),
|
||||
TwitterHandle = table.Column<string>(type: "VARCHAR(126)", nullable: true, defaultValueSql: "NULL")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_maintainers", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "rules",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "BIGINT UNSIGNED", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
CreatedDateUtc = table.Column<DateTime>(type: "TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Raw = table.Column<string>(type: "VARCHAR(8192)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_rules", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "software",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "SMALLINT UNSIGNED", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
CreatedDateUtc = table.Column<DateTime>(type: "TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
DownloadUrl = table.Column<string>(type: "TEXT", nullable: true),
|
||||
HomeUrl = table.Column<string>(type: "TEXT", nullable: true),
|
||||
ModifiedDateUtc = table.Column<DateTime>(type: "TIMESTAMP", nullable: false),
|
||||
Name = table.Column<string>(type: "VARCHAR(126)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_software", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "syntaxes",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "SMALLINT UNSIGNED", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
CreatedDateUtc = table.Column<DateTime>(type: "TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
DefinitionUrl = table.Column<string>(type: "TEXT", nullable: true),
|
||||
ModifiedDateUtc = table.Column<DateTime>(type: "TIMESTAMP", nullable: false),
|
||||
Name = table.Column<string>(type: "VARCHAR(126)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_syntaxes", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "filterlists",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "SMALLINT UNSIGNED", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
CreatedDateUtc = table.Column<DateTime>(type: "TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Description = table.Column<string>(type: "TEXT", nullable: true),
|
||||
DescriptionSourceUrl = table.Column<string>(type: "TEXT", nullable: true),
|
||||
DiscontinuedDate = table.Column<DateTime>(nullable: true),
|
||||
DonateUrl = table.Column<string>(type: "TEXT", nullable: true),
|
||||
EmailAddress = table.Column<string>(type: "VARCHAR(126)", nullable: true, defaultValueSql: "NULL"),
|
||||
ForumUrl = table.Column<string>(type: "TEXT", nullable: true),
|
||||
HomeUrl = table.Column<string>(type: "TEXT", nullable: true),
|
||||
IssuesUrl = table.Column<string>(type: "TEXT", nullable: true),
|
||||
LicenseId = table.Column<int>(nullable: true),
|
||||
ModifiedDateUtc = table.Column<DateTime>(type: "TIMESTAMP", nullable: false),
|
||||
Name = table.Column<string>(type: "VARCHAR(126)", nullable: false),
|
||||
PolicyUrl = table.Column<string>(type: "TEXT", nullable: true),
|
||||
SubmissionUrl = table.Column<string>(type: "TEXT", nullable: true),
|
||||
SyntaxId = table.Column<int>(nullable: true),
|
||||
ViewUrl = table.Column<string>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_filterlists", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_filterlists_licenses_LicenseId",
|
||||
column: x => x.LicenseId,
|
||||
principalTable: "licenses",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_filterlists_syntaxes_SyntaxId",
|
||||
column: x => x.SyntaxId,
|
||||
principalTable: "syntaxes",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "software_syntaxes",
|
||||
columns: table => new
|
||||
{
|
||||
SyntaxId = table.Column<int>(nullable: false),
|
||||
SoftwareId = table.Column<int>(nullable: false),
|
||||
CreatedDateUtc = table.Column<DateTime>(type: "TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_software_syntaxes", x => new { x.SyntaxId, x.SoftwareId });
|
||||
table.ForeignKey(
|
||||
name: "FK_software_syntaxes_software_SoftwareId",
|
||||
column: x => x.SoftwareId,
|
||||
principalTable: "software",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_software_syntaxes_syntaxes_SyntaxId",
|
||||
column: x => x.SyntaxId,
|
||||
principalTable: "syntaxes",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "filterlists_languages",
|
||||
columns: table => new
|
||||
{
|
||||
FilterListId = table.Column<int>(nullable: false),
|
||||
LanguageId = table.Column<int>(nullable: false),
|
||||
CreatedDateUtc = table.Column<DateTime>(type: "TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_filterlists_languages", x => new { x.FilterListId, x.LanguageId });
|
||||
table.ForeignKey(
|
||||
name: "FK_filterlists_languages_filterlists_FilterListId",
|
||||
column: x => x.FilterListId,
|
||||
principalTable: "filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_filterlists_languages_languages_LanguageId",
|
||||
column: x => x.LanguageId,
|
||||
principalTable: "languages",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "filterlists_maintainers",
|
||||
columns: table => new
|
||||
{
|
||||
FilterListId = table.Column<int>(nullable: false),
|
||||
MaintainerId = table.Column<int>(nullable: false),
|
||||
CreatedDateUtc = table.Column<DateTime>(type: "TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_filterlists_maintainers", x => new { x.FilterListId, x.MaintainerId });
|
||||
table.ForeignKey(
|
||||
name: "FK_filterlists_maintainers_filterlists_FilterListId",
|
||||
column: x => x.FilterListId,
|
||||
principalTable: "filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_filterlists_maintainers_maintainers_MaintainerId",
|
||||
column: x => x.MaintainerId,
|
||||
principalTable: "maintainers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "forks",
|
||||
columns: table => new
|
||||
{
|
||||
ForkFilterListId = table.Column<int>(nullable: false),
|
||||
UpstreamFilterListId = table.Column<int>(nullable: false),
|
||||
CreatedDateUtc = table.Column<DateTime>(type: "TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_forks", x => new { x.ForkFilterListId, x.UpstreamFilterListId });
|
||||
table.ForeignKey(
|
||||
name: "FK_forks_filterlists_ForkFilterListId",
|
||||
column: x => x.ForkFilterListId,
|
||||
principalTable: "filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_forks_filterlists_UpstreamFilterListId",
|
||||
column: x => x.UpstreamFilterListId,
|
||||
principalTable: "filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "merges",
|
||||
columns: table => new
|
||||
{
|
||||
MergeFilterListId = table.Column<int>(nullable: false),
|
||||
UpstreamFilterListId = table.Column<int>(nullable: false),
|
||||
CreatedDateUtc = table.Column<DateTime>(type: "TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_merges", x => new { x.MergeFilterListId, x.UpstreamFilterListId });
|
||||
table.ForeignKey(
|
||||
name: "FK_merges_filterlists_MergeFilterListId",
|
||||
column: x => x.MergeFilterListId,
|
||||
principalTable: "filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_merges_filterlists_UpstreamFilterListId",
|
||||
column: x => x.UpstreamFilterListId,
|
||||
principalTable: "filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "snapshots",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "MEDIUMINT UNSIGNED", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
CreatedDateUtc = table.Column<DateTime>(type: "TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
FilterListId = table.Column<int>(nullable: false),
|
||||
HttpStatusCode = table.Column<int>(type: "SMALLINT UNSIGNED", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_snapshots", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_snapshots_filterlists_FilterListId",
|
||||
column: x => x.FilterListId,
|
||||
principalTable: "filterlists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "snapshots_rules",
|
||||
columns: table => new
|
||||
{
|
||||
SnapshotId = table.Column<int>(nullable: false),
|
||||
RuleId = table.Column<int>(nullable: false),
|
||||
CreatedDateUtc = table.Column<DateTime>(type: "TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_snapshots_rules", x => new { x.SnapshotId, x.RuleId });
|
||||
table.ForeignKey(
|
||||
name: "FK_snapshots_rules_rules_RuleId",
|
||||
column: x => x.RuleId,
|
||||
principalTable: "rules",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_snapshots_rules_snapshots_SnapshotId",
|
||||
column: x => x.SnapshotId,
|
||||
principalTable: "snapshots",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_filterlists_LicenseId",
|
||||
table: "filterlists",
|
||||
column: "LicenseId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_filterlists_SyntaxId",
|
||||
table: "filterlists",
|
||||
column: "SyntaxId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_filterlists_languages_LanguageId_FilterListId",
|
||||
table: "filterlists_languages",
|
||||
columns: new[] { "LanguageId", "FilterListId" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_filterlists_maintainers_MaintainerId_FilterListId",
|
||||
table: "filterlists_maintainers",
|
||||
columns: new[] { "MaintainerId", "FilterListId" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_forks_UpstreamFilterListId_ForkFilterListId",
|
||||
table: "forks",
|
||||
columns: new[] { "UpstreamFilterListId", "ForkFilterListId" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_merges_UpstreamFilterListId_MergeFilterListId",
|
||||
table: "merges",
|
||||
columns: new[] { "UpstreamFilterListId", "MergeFilterListId" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_snapshots_FilterListId",
|
||||
table: "snapshots",
|
||||
column: "FilterListId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_snapshots_rules_RuleId_SnapshotId",
|
||||
table: "snapshots_rules",
|
||||
columns: new[] { "RuleId", "SnapshotId" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_software_syntaxes_SoftwareId_SyntaxId",
|
||||
table: "software_syntaxes",
|
||||
columns: new[] { "SoftwareId", "SyntaxId" });
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "filterlists_languages");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "filterlists_maintainers");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "forks");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "merges");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "snapshots_rules");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "software_syntaxes");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "languages");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "maintainers");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "rules");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "snapshots");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "software");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "filterlists");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "licenses");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "syntaxes");
|
||||
}
|
||||
}
|
||||
}
|
||||
505
src/FilterLists.Api/Migrations/20180208153839_InitialCreate.Designer.cs
generated
Normal file
505
src/FilterLists.Api/Migrations/20180208153839_InitialCreate.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,505 @@
|
|||
// <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("20180208153839_InitialCreate")]
|
||||
partial class InitialCreate
|
||||
{
|
||||
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<string>("SubmissionUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("SyntaxId");
|
||||
|
||||
b.Property<string>("ViewUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
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", "FilterListId");
|
||||
|
||||
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", "FilterListId");
|
||||
|
||||
b.ToTable("filterlists_maintainers");
|
||||
});
|
||||
|
||||
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", "ForkFilterListId");
|
||||
|
||||
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", "MergeFilterListId");
|
||||
|
||||
b.ToTable("merges");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.SnapshotRule", b =>
|
||||
{
|
||||
b.Property<int>("SnapshotId");
|
||||
|
||||
b.Property<int>("RuleId");
|
||||
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.HasKey("SnapshotId", "RuleId");
|
||||
|
||||
b.HasIndex("RuleId", "SnapshotId");
|
||||
|
||||
b.ToTable("snapshots_rules");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.SoftwareSyntax", b =>
|
||||
{
|
||||
b.Property<int>("SyntaxId");
|
||||
|
||||
b.Property<int>("SoftwareId");
|
||||
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.HasKey("SyntaxId", "SoftwareId");
|
||||
|
||||
b.HasIndex("SoftwareId", "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("TINYINT 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("INT UNSIGNED");
|
||||
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.Property<string>("Raw")
|
||||
.IsRequired()
|
||||
.HasColumnType("VARCHAR(8192)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("rules");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Snapshot", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("MEDIUMINT UNSIGNED");
|
||||
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.Property<int>("FilterListId");
|
||||
|
||||
b.Property<int?>("HttpStatusCode")
|
||||
.HasColumnType("SMALLINT UNSIGNED");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("FilterListId");
|
||||
|
||||
b.ToTable("snapshots");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Software", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TINYINT 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("TINYINT 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", "License")
|
||||
.WithMany("FilterLists")
|
||||
.HasForeignKey("LicenseId");
|
||||
|
||||
b.HasOne("FilterLists.Data.Entities.Syntax", "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.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
|
||||
}
|
||||
}
|
||||
}
|
||||
435
src/FilterLists.Api/Migrations/20180208153839_InitialCreate.cs
Normal file
435
src/FilterLists.Api/Migrations/20180208153839_InitialCreate.cs
Normal file
|
|
@ -0,0 +1,435 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace FilterLists.Api.Migrations
|
||||
{
|
||||
public partial class InitialCreate : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
"languages",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<int>("SMALLINT UNSIGNED", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
CreatedDateUtc = table.Column<DateTime>("TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Iso6391 = table.Column<string>("VARCHAR(2)", nullable: true, defaultValueSql: "NULL"),
|
||||
Iso6392 = table.Column<string>("VARCHAR(3)", nullable: true, defaultValueSql: "NULL"),
|
||||
Iso6392B = table.Column<string>("VARCHAR(3)", nullable: true, defaultValueSql: "NULL"),
|
||||
Iso6392T = table.Column<string>("VARCHAR(3)", nullable: true, defaultValueSql: "NULL"),
|
||||
Iso6393 = table.Column<string>("VARCHAR(3)", nullable: true, defaultValueSql: "NULL"),
|
||||
LocalName = table.Column<string>("VARCHAR(126)", nullable: true, defaultValueSql: "NULL"),
|
||||
ModifiedDateUtc = table.Column<DateTime>("TIMESTAMP", nullable: false),
|
||||
Name = table.Column<string>("VARCHAR(126)", nullable: true, defaultValueSql: "NULL")
|
||||
},
|
||||
constraints: table => { table.PrimaryKey("PK_languages", x => x.Id); });
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
"licenses",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<int>("TINYINT UNSIGNED", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
CreatedDateUtc = table.Column<DateTime>("TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
DescriptionUrl = table.Column<string>("TEXT", nullable: true),
|
||||
ModifiedDateUtc = table.Column<DateTime>("TIMESTAMP", nullable: false),
|
||||
Name = table.Column<string>("VARCHAR(126)", nullable: false),
|
||||
PermissiveAdaptation = table.Column<bool>(nullable: false),
|
||||
PermissiveCommercial = table.Column<bool>(nullable: false)
|
||||
},
|
||||
constraints: table => { table.PrimaryKey("PK_licenses", x => x.Id); });
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
"maintainers",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<int>("SMALLINT UNSIGNED", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
CreatedDateUtc = table.Column<DateTime>("TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
EmailAddress = table.Column<string>("VARCHAR(126)", nullable: true, defaultValueSql: "NULL"),
|
||||
HomeUrl = table.Column<string>("TEXT", nullable: true),
|
||||
ModifiedDateUtc = table.Column<DateTime>("TIMESTAMP", nullable: false),
|
||||
Name = table.Column<string>("VARCHAR(126)", nullable: false),
|
||||
TwitterHandle = table.Column<string>("VARCHAR(126)", nullable: true, defaultValueSql: "NULL")
|
||||
},
|
||||
constraints: table => { table.PrimaryKey("PK_maintainers", x => x.Id); });
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
"rules",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<int>("INT UNSIGNED", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
CreatedDateUtc = table.Column<DateTime>("TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Raw = table.Column<string>("VARCHAR(8192)", nullable: false)
|
||||
},
|
||||
constraints: table => { table.PrimaryKey("PK_rules", x => x.Id); });
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
"software",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<int>("TINYINT UNSIGNED", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
CreatedDateUtc = table.Column<DateTime>("TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
DownloadUrl = table.Column<string>("TEXT", nullable: true),
|
||||
HomeUrl = table.Column<string>("TEXT", nullable: true),
|
||||
ModifiedDateUtc = table.Column<DateTime>("TIMESTAMP", nullable: false),
|
||||
Name = table.Column<string>("VARCHAR(126)", nullable: false)
|
||||
},
|
||||
constraints: table => { table.PrimaryKey("PK_software", x => x.Id); });
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
"syntaxes",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<int>("TINYINT UNSIGNED", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
CreatedDateUtc = table.Column<DateTime>("TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
DefinitionUrl = table.Column<string>("TEXT", nullable: true),
|
||||
ModifiedDateUtc = table.Column<DateTime>("TIMESTAMP", nullable: false),
|
||||
Name = table.Column<string>("VARCHAR(126)", nullable: false)
|
||||
},
|
||||
constraints: table => { table.PrimaryKey("PK_syntaxes", x => x.Id); });
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
"filterlists",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<int>("SMALLINT UNSIGNED", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
CreatedDateUtc = table.Column<DateTime>("TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Description = table.Column<string>("TEXT", nullable: true),
|
||||
DescriptionSourceUrl = table.Column<string>("TEXT", nullable: true),
|
||||
DiscontinuedDate = table.Column<DateTime>(nullable: true),
|
||||
DonateUrl = table.Column<string>("TEXT", nullable: true),
|
||||
EmailAddress = table.Column<string>("VARCHAR(126)", nullable: true, defaultValueSql: "NULL"),
|
||||
ForumUrl = table.Column<string>("TEXT", nullable: true),
|
||||
HomeUrl = table.Column<string>("TEXT", nullable: true),
|
||||
IssuesUrl = table.Column<string>("TEXT", nullable: true),
|
||||
LicenseId = table.Column<int>(nullable: true),
|
||||
ModifiedDateUtc = table.Column<DateTime>("TIMESTAMP", nullable: false),
|
||||
Name = table.Column<string>("VARCHAR(126)", nullable: false),
|
||||
PolicyUrl = table.Column<string>("TEXT", nullable: true),
|
||||
SubmissionUrl = table.Column<string>("TEXT", nullable: true),
|
||||
SyntaxId = table.Column<int>(nullable: true),
|
||||
ViewUrl = table.Column<string>("TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_filterlists", x => x.Id);
|
||||
table.ForeignKey(
|
||||
"FK_filterlists_licenses_LicenseId",
|
||||
x => x.LicenseId,
|
||||
"licenses",
|
||||
"Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
"FK_filterlists_syntaxes_SyntaxId",
|
||||
x => x.SyntaxId,
|
||||
"syntaxes",
|
||||
"Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
"software_syntaxes",
|
||||
table => new
|
||||
{
|
||||
SyntaxId = table.Column<int>(nullable: false),
|
||||
SoftwareId = table.Column<int>(nullable: false),
|
||||
CreatedDateUtc = table.Column<DateTime>("TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_software_syntaxes", x => new {x.SyntaxId, x.SoftwareId});
|
||||
table.ForeignKey(
|
||||
"FK_software_syntaxes_software_SoftwareId",
|
||||
x => x.SoftwareId,
|
||||
"software",
|
||||
"Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
"FK_software_syntaxes_syntaxes_SyntaxId",
|
||||
x => x.SyntaxId,
|
||||
"syntaxes",
|
||||
"Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
"filterlists_languages",
|
||||
table => new
|
||||
{
|
||||
FilterListId = table.Column<int>(nullable: false),
|
||||
LanguageId = table.Column<int>(nullable: false),
|
||||
CreatedDateUtc = table.Column<DateTime>("TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_filterlists_languages", x => new {x.FilterListId, x.LanguageId});
|
||||
table.ForeignKey(
|
||||
"FK_filterlists_languages_filterlists_FilterListId",
|
||||
x => x.FilterListId,
|
||||
"filterlists",
|
||||
"Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
"FK_filterlists_languages_languages_LanguageId",
|
||||
x => x.LanguageId,
|
||||
"languages",
|
||||
"Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
"filterlists_maintainers",
|
||||
table => new
|
||||
{
|
||||
FilterListId = table.Column<int>(nullable: false),
|
||||
MaintainerId = table.Column<int>(nullable: false),
|
||||
CreatedDateUtc = table.Column<DateTime>("TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_filterlists_maintainers", x => new {x.FilterListId, x.MaintainerId});
|
||||
table.ForeignKey(
|
||||
"FK_filterlists_maintainers_filterlists_FilterListId",
|
||||
x => x.FilterListId,
|
||||
"filterlists",
|
||||
"Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
"FK_filterlists_maintainers_maintainers_MaintainerId",
|
||||
x => x.MaintainerId,
|
||||
"maintainers",
|
||||
"Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
"forks",
|
||||
table => new
|
||||
{
|
||||
ForkFilterListId = table.Column<int>(nullable: false),
|
||||
UpstreamFilterListId = table.Column<int>(nullable: false),
|
||||
CreatedDateUtc = table.Column<DateTime>("TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_forks", x => new {x.ForkFilterListId, x.UpstreamFilterListId});
|
||||
table.ForeignKey(
|
||||
"FK_forks_filterlists_ForkFilterListId",
|
||||
x => x.ForkFilterListId,
|
||||
"filterlists",
|
||||
"Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
"FK_forks_filterlists_UpstreamFilterListId",
|
||||
x => x.UpstreamFilterListId,
|
||||
"filterlists",
|
||||
"Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
"merges",
|
||||
table => new
|
||||
{
|
||||
MergeFilterListId = table.Column<int>(nullable: false),
|
||||
UpstreamFilterListId = table.Column<int>(nullable: false),
|
||||
CreatedDateUtc = table.Column<DateTime>("TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_merges", x => new {x.MergeFilterListId, x.UpstreamFilterListId});
|
||||
table.ForeignKey(
|
||||
"FK_merges_filterlists_MergeFilterListId",
|
||||
x => x.MergeFilterListId,
|
||||
"filterlists",
|
||||
"Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
"FK_merges_filterlists_UpstreamFilterListId",
|
||||
x => x.UpstreamFilterListId,
|
||||
"filterlists",
|
||||
"Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
"snapshots",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<int>("MEDIUMINT UNSIGNED", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
CreatedDateUtc = table.Column<DateTime>("TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
FilterListId = table.Column<int>(nullable: false),
|
||||
HttpStatusCode = table.Column<int>("SMALLINT UNSIGNED", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_snapshots", x => x.Id);
|
||||
table.ForeignKey(
|
||||
"FK_snapshots_filterlists_FilterListId",
|
||||
x => x.FilterListId,
|
||||
"filterlists",
|
||||
"Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
"snapshots_rules",
|
||||
table => new
|
||||
{
|
||||
SnapshotId = table.Column<int>(nullable: false),
|
||||
RuleId = table.Column<int>(nullable: false),
|
||||
CreatedDateUtc = table.Column<DateTime>("TIMESTAMP", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_snapshots_rules", x => new {x.SnapshotId, x.RuleId});
|
||||
table.ForeignKey(
|
||||
"FK_snapshots_rules_rules_RuleId",
|
||||
x => x.RuleId,
|
||||
"rules",
|
||||
"Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
"FK_snapshots_rules_snapshots_SnapshotId",
|
||||
x => x.SnapshotId,
|
||||
"snapshots",
|
||||
"Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
"IX_filterlists_LicenseId",
|
||||
"filterlists",
|
||||
"LicenseId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
"IX_filterlists_SyntaxId",
|
||||
"filterlists",
|
||||
"SyntaxId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
"IX_filterlists_languages_LanguageId_FilterListId",
|
||||
"filterlists_languages",
|
||||
new[] {"LanguageId", "FilterListId"});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
"IX_filterlists_maintainers_MaintainerId_FilterListId",
|
||||
"filterlists_maintainers",
|
||||
new[] {"MaintainerId", "FilterListId"});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
"IX_forks_UpstreamFilterListId_ForkFilterListId",
|
||||
"forks",
|
||||
new[] {"UpstreamFilterListId", "ForkFilterListId"});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
"IX_merges_UpstreamFilterListId_MergeFilterListId",
|
||||
"merges",
|
||||
new[] {"UpstreamFilterListId", "MergeFilterListId"});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
"IX_snapshots_FilterListId",
|
||||
"snapshots",
|
||||
"FilterListId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
"IX_snapshots_rules_RuleId_SnapshotId",
|
||||
"snapshots_rules",
|
||||
new[] {"RuleId", "SnapshotId"});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
"IX_software_syntaxes_SoftwareId_SyntaxId",
|
||||
"software_syntaxes",
|
||||
new[] {"SoftwareId", "SyntaxId"});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
"filterlists_languages");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
"filterlists_maintainers");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
"forks");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
"merges");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
"snapshots_rules");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
"software_syntaxes");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
"languages");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
"maintainers");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
"rules");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
"snapshots");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
"software");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
"filterlists");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
"licenses");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
"syntaxes");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +1,15 @@
|
|||
// <auto-generated />
|
||||
|
||||
using System;
|
||||
using FilterLists.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
using System;
|
||||
|
||||
namespace FilterLists.Api.Migrations
|
||||
{
|
||||
[DbContext(typeof(FilterListsDbContext))]
|
||||
partial class FilterListsDbContextModelSnapshot : ModelSnapshot
|
||||
internal class FilterListsDbContextModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
|
|
@ -20,485 +19,485 @@ protected override void BuildModel(ModelBuilder modelBuilder)
|
|||
.HasAnnotation("ProductVersion", "2.0.1-rtm-125");
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.FilterList", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("SMALLINT UNSIGNED");
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("SMALLINT UNSIGNED");
|
||||
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("TEXT");
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("DescriptionSourceUrl")
|
||||
.HasColumnType("TEXT");
|
||||
b.Property<string>("DescriptionSourceUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime?>("DiscontinuedDate");
|
||||
b.Property<DateTime?>("DiscontinuedDate");
|
||||
|
||||
b.Property<string>("DonateUrl")
|
||||
.HasColumnType("TEXT");
|
||||
b.Property<string>("DonateUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("EmailAddress")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(126)")
|
||||
.HasDefaultValueSql("NULL");
|
||||
b.Property<string>("EmailAddress")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(126)")
|
||||
.HasDefaultValueSql("NULL");
|
||||
|
||||
b.Property<string>("ForumUrl")
|
||||
.HasColumnType("TEXT");
|
||||
b.Property<string>("ForumUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("HomeUrl")
|
||||
.HasColumnType("TEXT");
|
||||
b.Property<string>("HomeUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("IssuesUrl")
|
||||
.HasColumnType("TEXT");
|
||||
b.Property<string>("IssuesUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("LicenseId");
|
||||
b.Property<int?>("LicenseId");
|
||||
|
||||
b.Property<DateTime>("ModifiedDateUtc")
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
b.Property<DateTime>("ModifiedDateUtc")
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("VARCHAR(126)");
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("VARCHAR(126)");
|
||||
|
||||
b.Property<string>("PolicyUrl")
|
||||
.HasColumnType("TEXT");
|
||||
b.Property<string>("PolicyUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("SubmissionUrl")
|
||||
.HasColumnType("TEXT");
|
||||
b.Property<string>("SubmissionUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("SyntaxId");
|
||||
b.Property<int?>("SyntaxId");
|
||||
|
||||
b.Property<string>("ViewUrl")
|
||||
.HasColumnType("TEXT");
|
||||
b.Property<string>("ViewUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("LicenseId");
|
||||
b.HasIndex("LicenseId");
|
||||
|
||||
b.HasIndex("SyntaxId");
|
||||
b.HasIndex("SyntaxId");
|
||||
|
||||
b.ToTable("filterlists");
|
||||
});
|
||||
b.ToTable("filterlists");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.FilterListLanguage", b =>
|
||||
{
|
||||
b.Property<int>("FilterListId");
|
||||
{
|
||||
b.Property<int>("FilterListId");
|
||||
|
||||
b.Property<int>("LanguageId");
|
||||
b.Property<int>("LanguageId");
|
||||
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.HasKey("FilterListId", "LanguageId");
|
||||
b.HasKey("FilterListId", "LanguageId");
|
||||
|
||||
b.HasIndex("LanguageId", "FilterListId");
|
||||
b.HasIndex("LanguageId", "FilterListId");
|
||||
|
||||
b.ToTable("filterlists_languages");
|
||||
});
|
||||
b.ToTable("filterlists_languages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.FilterListMaintainer", b =>
|
||||
{
|
||||
b.Property<int>("FilterListId");
|
||||
{
|
||||
b.Property<int>("FilterListId");
|
||||
|
||||
b.Property<int>("MaintainerId");
|
||||
b.Property<int>("MaintainerId");
|
||||
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.HasKey("FilterListId", "MaintainerId");
|
||||
b.HasKey("FilterListId", "MaintainerId");
|
||||
|
||||
b.HasIndex("MaintainerId", "FilterListId");
|
||||
b.HasIndex("MaintainerId", "FilterListId");
|
||||
|
||||
b.ToTable("filterlists_maintainers");
|
||||
});
|
||||
b.ToTable("filterlists_maintainers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.Fork", b =>
|
||||
{
|
||||
b.Property<int>("ForkFilterListId");
|
||||
{
|
||||
b.Property<int>("ForkFilterListId");
|
||||
|
||||
b.Property<int>("UpstreamFilterListId");
|
||||
b.Property<int>("UpstreamFilterListId");
|
||||
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.HasKey("ForkFilterListId", "UpstreamFilterListId");
|
||||
b.HasKey("ForkFilterListId", "UpstreamFilterListId");
|
||||
|
||||
b.HasIndex("UpstreamFilterListId", "ForkFilterListId");
|
||||
b.HasIndex("UpstreamFilterListId", "ForkFilterListId");
|
||||
|
||||
b.ToTable("forks");
|
||||
});
|
||||
b.ToTable("forks");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.Merge", b =>
|
||||
{
|
||||
b.Property<int>("MergeFilterListId");
|
||||
{
|
||||
b.Property<int>("MergeFilterListId");
|
||||
|
||||
b.Property<int>("UpstreamFilterListId");
|
||||
b.Property<int>("UpstreamFilterListId");
|
||||
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.HasKey("MergeFilterListId", "UpstreamFilterListId");
|
||||
b.HasKey("MergeFilterListId", "UpstreamFilterListId");
|
||||
|
||||
b.HasIndex("UpstreamFilterListId", "MergeFilterListId");
|
||||
b.HasIndex("UpstreamFilterListId", "MergeFilterListId");
|
||||
|
||||
b.ToTable("merges");
|
||||
});
|
||||
b.ToTable("merges");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.SnapshotRule", b =>
|
||||
{
|
||||
b.Property<int>("SnapshotId");
|
||||
{
|
||||
b.Property<int>("SnapshotId");
|
||||
|
||||
b.Property<int>("RuleId");
|
||||
b.Property<int>("RuleId");
|
||||
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.HasKey("SnapshotId", "RuleId");
|
||||
b.HasKey("SnapshotId", "RuleId");
|
||||
|
||||
b.HasIndex("RuleId", "SnapshotId");
|
||||
b.HasIndex("RuleId", "SnapshotId");
|
||||
|
||||
b.ToTable("snapshots_rules");
|
||||
});
|
||||
b.ToTable("snapshots_rules");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Junctions.SoftwareSyntax", b =>
|
||||
{
|
||||
b.Property<int>("SyntaxId");
|
||||
{
|
||||
b.Property<int>("SyntaxId");
|
||||
|
||||
b.Property<int>("SoftwareId");
|
||||
b.Property<int>("SoftwareId");
|
||||
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.HasKey("SyntaxId", "SoftwareId");
|
||||
b.HasKey("SyntaxId", "SoftwareId");
|
||||
|
||||
b.HasIndex("SoftwareId", "SyntaxId");
|
||||
b.HasIndex("SoftwareId", "SyntaxId");
|
||||
|
||||
b.ToTable("software_syntaxes");
|
||||
});
|
||||
b.ToTable("software_syntaxes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Language", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("SMALLINT UNSIGNED");
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("SMALLINT UNSIGNED");
|
||||
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.Property<string>("Iso6391")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(2)")
|
||||
.HasDefaultValueSql("NULL");
|
||||
b.Property<string>("Iso6391")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(2)")
|
||||
.HasDefaultValueSql("NULL");
|
||||
|
||||
b.Property<string>("Iso6392")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(3)")
|
||||
.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>("Iso6392B")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(3)")
|
||||
.HasDefaultValueSql("NULL");
|
||||
|
||||
b.Property<string>("Iso6392T")
|
||||
.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>("Iso6393")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(3)")
|
||||
.HasDefaultValueSql("NULL");
|
||||
|
||||
b.Property<string>("LocalName")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(126)")
|
||||
.HasDefaultValueSql("NULL");
|
||||
b.Property<string>("LocalName")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(126)")
|
||||
.HasDefaultValueSql("NULL");
|
||||
|
||||
b.Property<DateTime>("ModifiedDateUtc")
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
b.Property<DateTime>("ModifiedDateUtc")
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(126)")
|
||||
.HasDefaultValueSql("NULL");
|
||||
b.Property<string>("Name")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(126)")
|
||||
.HasDefaultValueSql("NULL");
|
||||
|
||||
b.HasKey("Id");
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("languages");
|
||||
});
|
||||
b.ToTable("languages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.License", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("SMALLINT UNSIGNED");
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TINYINT UNSIGNED");
|
||||
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.Property<string>("DescriptionUrl")
|
||||
.HasColumnType("TEXT");
|
||||
b.Property<string>("DescriptionUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("ModifiedDateUtc")
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
b.Property<DateTime>("ModifiedDateUtc")
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("VARCHAR(126)");
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("VARCHAR(126)");
|
||||
|
||||
b.Property<bool>("PermissiveAdaptation");
|
||||
b.Property<bool>("PermissiveAdaptation");
|
||||
|
||||
b.Property<bool>("PermissiveCommercial");
|
||||
b.Property<bool>("PermissiveCommercial");
|
||||
|
||||
b.HasKey("Id");
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("licenses");
|
||||
});
|
||||
b.ToTable("licenses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Maintainer", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("SMALLINT UNSIGNED");
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("SMALLINT UNSIGNED");
|
||||
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.Property<string>("EmailAddress")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(126)")
|
||||
.HasDefaultValueSql("NULL");
|
||||
b.Property<string>("EmailAddress")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(126)")
|
||||
.HasDefaultValueSql("NULL");
|
||||
|
||||
b.Property<string>("HomeUrl")
|
||||
.HasColumnType("TEXT");
|
||||
b.Property<string>("HomeUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("ModifiedDateUtc")
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
b.Property<DateTime>("ModifiedDateUtc")
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("VARCHAR(126)");
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("VARCHAR(126)");
|
||||
|
||||
b.Property<string>("TwitterHandle")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(126)")
|
||||
.HasDefaultValueSql("NULL");
|
||||
b.Property<string>("TwitterHandle")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("VARCHAR(126)")
|
||||
.HasDefaultValueSql("NULL");
|
||||
|
||||
b.HasKey("Id");
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("maintainers");
|
||||
});
|
||||
b.ToTable("maintainers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Rule", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("BIGINT UNSIGNED");
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INT UNSIGNED");
|
||||
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.Property<string>("Raw")
|
||||
.IsRequired()
|
||||
.HasColumnType("VARCHAR(8192)");
|
||||
b.Property<string>("Raw")
|
||||
.IsRequired()
|
||||
.HasColumnType("VARCHAR(8192)");
|
||||
|
||||
b.HasKey("Id");
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("rules");
|
||||
});
|
||||
b.ToTable("rules");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Snapshot", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("MEDIUMINT UNSIGNED");
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("MEDIUMINT UNSIGNED");
|
||||
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.Property<int>("FilterListId");
|
||||
b.Property<int>("FilterListId");
|
||||
|
||||
b.Property<int?>("HttpStatusCode")
|
||||
.HasColumnType("SMALLINT UNSIGNED");
|
||||
b.Property<int?>("HttpStatusCode")
|
||||
.HasColumnType("SMALLINT UNSIGNED");
|
||||
|
||||
b.HasKey("Id");
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("FilterListId");
|
||||
b.HasIndex("FilterListId");
|
||||
|
||||
b.ToTable("snapshots");
|
||||
});
|
||||
b.ToTable("snapshots");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Software", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("SMALLINT UNSIGNED");
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TINYINT UNSIGNED");
|
||||
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.Property<string>("DownloadUrl")
|
||||
.HasColumnType("TEXT");
|
||||
b.Property<string>("DownloadUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("HomeUrl")
|
||||
.HasColumnType("TEXT");
|
||||
b.Property<string>("HomeUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("ModifiedDateUtc")
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
b.Property<DateTime>("ModifiedDateUtc")
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("VARCHAR(126)");
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("VARCHAR(126)");
|
||||
|
||||
b.HasKey("Id");
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("software");
|
||||
});
|
||||
b.ToTable("software");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.Syntax", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("SMALLINT UNSIGNED");
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TINYINT UNSIGNED");
|
||||
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
b.Property<DateTime>("CreatedDateUtc")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.Property<string>("DefinitionUrl")
|
||||
.HasColumnType("TEXT");
|
||||
b.Property<string>("DefinitionUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("ModifiedDateUtc")
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
b.Property<DateTime>("ModifiedDateUtc")
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("TIMESTAMP");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("VARCHAR(126)");
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("VARCHAR(126)");
|
||||
|
||||
b.HasKey("Id");
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("syntaxes");
|
||||
});
|
||||
b.ToTable("syntaxes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Data.Entities.FilterList", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Data.Entities.License", "License")
|
||||
.WithMany("FilterLists")
|
||||
.HasForeignKey("LicenseId");
|
||||
{
|
||||
b.HasOne("FilterLists.Data.Entities.License", "License")
|
||||
.WithMany("FilterLists")
|
||||
.HasForeignKey("LicenseId");
|
||||
|
||||
b.HasOne("FilterLists.Data.Entities.Syntax", "Syntax")
|
||||
.WithMany("FilterLists")
|
||||
.HasForeignKey("SyntaxId");
|
||||
});
|
||||
b.HasOne("FilterLists.Data.Entities.Syntax", "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.FilterList", "FilterList")
|
||||
.WithMany("FilterListLanguages")
|
||||
.HasForeignKey("FilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("FilterLists.Data.Entities.Language", "Language")
|
||||
.WithMany("FilterListLanguages")
|
||||
.HasForeignKey("LanguageId")
|
||||
.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.FilterList", "FilterList")
|
||||
.WithMany("FilterListMaintainers")
|
||||
.HasForeignKey("FilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("FilterLists.Data.Entities.Maintainer", "Maintainer")
|
||||
.WithMany("FilterListMaintainers")
|
||||
.HasForeignKey("MaintainerId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
b.HasOne("FilterLists.Data.Entities.Maintainer", "Maintainer")
|
||||
.WithMany("FilterListMaintainers")
|
||||
.HasForeignKey("MaintainerId")
|
||||
.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", "ForkFilterList")
|
||||
.WithMany("ForkFilterLists")
|
||||
.HasForeignKey("ForkFilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("FilterLists.Data.Entities.FilterList", "UpstreamFilterList")
|
||||
.WithMany("UpstreamForkFilterLists")
|
||||
.HasForeignKey("UpstreamFilterListId")
|
||||
.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", "MergeFilterList")
|
||||
.WithMany("MergeFilterLists")
|
||||
.HasForeignKey("MergeFilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("FilterLists.Data.Entities.FilterList", "UpstreamFilterList")
|
||||
.WithMany("UpstreamMergeFilterLists")
|
||||
.HasForeignKey("UpstreamFilterListId")
|
||||
.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.Rule", "Rule")
|
||||
.WithMany("SnapshotRules")
|
||||
.HasForeignKey("RuleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("FilterLists.Data.Entities.Snapshot", "Snapshot")
|
||||
.WithMany("SnapshotRules")
|
||||
.HasForeignKey("SnapshotId")
|
||||
.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.Software", "Software")
|
||||
.WithMany("SoftwareSyntaxes")
|
||||
.HasForeignKey("SoftwareId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("FilterLists.Data.Entities.Syntax", "Syntax")
|
||||
.WithMany("SoftwareSyntaxes")
|
||||
.HasForeignKey("SyntaxId")
|
||||
.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);
|
||||
});
|
||||
{
|
||||
b.HasOne("FilterLists.Data.Entities.FilterList", "FilterList")
|
||||
.WithMany("Snapshots")
|
||||
.HasForeignKey("FilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -10,6 +10,8 @@ public override void Configure(EntityTypeBuilder<License> entityTypeBuilder)
|
|||
{
|
||||
base.Configure(entityTypeBuilder);
|
||||
entityTypeBuilder.ToTable("licenses");
|
||||
entityTypeBuilder.Property(x => x.Id)
|
||||
.HasColumnType("TINYINT UNSIGNED");
|
||||
entityTypeBuilder.Property(x => x.DescriptionUrl)
|
||||
.HasColumnType("TEXT");
|
||||
entityTypeBuilder.Property(x => x.Name)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ public override void Configure(EntityTypeBuilder<Rule> entityTypeBuilder)
|
|||
base.Configure(entityTypeBuilder);
|
||||
entityTypeBuilder.ToTable("rules");
|
||||
entityTypeBuilder.Property(x => x.Id)
|
||||
.HasColumnType("BIGINT UNSIGNED");
|
||||
.HasColumnType("INT UNSIGNED");
|
||||
entityTypeBuilder.Ignore(x => x.ModifiedDateUtc);
|
||||
entityTypeBuilder.Property(x => x.Raw)
|
||||
.HasColumnType("VARCHAR(8192)")
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ public override void Configure(EntityTypeBuilder<Software> entityTypeBuilder)
|
|||
{
|
||||
base.Configure(entityTypeBuilder);
|
||||
entityTypeBuilder.ToTable("software");
|
||||
entityTypeBuilder.Property(x => x.Id)
|
||||
.HasColumnType("TINYINT UNSIGNED");
|
||||
entityTypeBuilder.Property(x => x.DownloadUrl)
|
||||
.HasColumnType("TEXT");
|
||||
entityTypeBuilder.Property(x => x.HomeUrl)
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ public override void Configure(EntityTypeBuilder<Syntax> entityTypeBuilder)
|
|||
{
|
||||
base.Configure(entityTypeBuilder);
|
||||
entityTypeBuilder.ToTable("syntaxes");
|
||||
entityTypeBuilder.Property(x => x.Id)
|
||||
.HasColumnType("TINYINT UNSIGNED");
|
||||
entityTypeBuilder.Property(x => x.DefinitionUrl)
|
||||
.HasColumnType("TEXT");
|
||||
entityTypeBuilder.Property(x => x.Name)
|
||||
|
|
|
|||
Loading…
Reference in a new issue