mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
fix(directory): 🐛🚧 re-gen Initial (schema) migration
This commit is contained in:
parent
8d42aac73a
commit
8779ee3e46
3 changed files with 1452 additions and 0 deletions
|
|
@ -0,0 +1,503 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using FilterLists.Directory.Infrastructure.Persistence.Queries.Context;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
|
||||
{
|
||||
[DbContext(typeof(QueryDbContext))]
|
||||
[Migration("20201114135306_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
|
||||
.HasAnnotation("ProductVersion", "3.1.9")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Dependent", b =>
|
||||
{
|
||||
b.Property<int>("DependencyFilterListId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("DependentFilterListId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("DependencyFilterListId", "DependentFilterListId");
|
||||
|
||||
b.HasIndex("DependentFilterListId");
|
||||
|
||||
b.ToTable("Dependents");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("ChatUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("DonateUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("EmailAddress")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ForumUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("HomeUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("IssuesUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("LicenseId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("OnionUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("PolicyUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("SubmissionUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("LicenseId");
|
||||
|
||||
b.ToTable("FilterLists");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListLanguage", b =>
|
||||
{
|
||||
b.Property<int>("FilterListId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Iso6391")
|
||||
.HasColumnType("character varying(2)");
|
||||
|
||||
b.HasKey("FilterListId", "Iso6391");
|
||||
|
||||
b.HasIndex("Iso6391");
|
||||
|
||||
b.ToTable("FilterListLanguages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListMaintainer", b =>
|
||||
{
|
||||
b.Property<int>("FilterListId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("MaintainerId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("FilterListId", "MaintainerId");
|
||||
|
||||
b.HasIndex("MaintainerId");
|
||||
|
||||
b.ToTable("FilterListMaintainers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListSyntax", b =>
|
||||
{
|
||||
b.Property<int>("FilterListId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("SyntaxId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("FilterListId", "SyntaxId");
|
||||
|
||||
b.HasIndex("SyntaxId");
|
||||
|
||||
b.ToTable("FilterListSyntaxes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListTag", b =>
|
||||
{
|
||||
b.Property<int>("FilterListId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("TagId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("FilterListId", "TagId");
|
||||
|
||||
b.HasIndex("TagId");
|
||||
|
||||
b.ToTable("FilterListTags");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListViewUrl", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int>("FilterListId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<short>("Primariness")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("smallint")
|
||||
.HasDefaultValue((short)1);
|
||||
|
||||
b.Property<short>("SegmentNumber")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("smallint")
|
||||
.HasDefaultValue((short)1);
|
||||
|
||||
b.Property<string>("Url")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("FilterListId", "SegmentNumber", "Primariness")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("FilterListViewUrls");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Fork", b =>
|
||||
{
|
||||
b.Property<int>("UpstreamFilterListId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("ForkFilterListId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("UpstreamFilterListId", "ForkFilterListId");
|
||||
|
||||
b.HasIndex("ForkFilterListId");
|
||||
|
||||
b.ToTable("Forks");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Language", b =>
|
||||
{
|
||||
b.Property<string>("Iso6391")
|
||||
.HasColumnType("character(2)")
|
||||
.IsFixedLength(true)
|
||||
.HasMaxLength(2);
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Iso6391");
|
||||
|
||||
b.ToTable("Languages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.License", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("PermitsCommercialUse")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("PermitsDistribution")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("PermitsModification")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("Url")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Licenses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Maintainer", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("EmailAddress")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("TwitterHandle")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Url")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Maintainers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Merge", b =>
|
||||
{
|
||||
b.Property<int>("IncludedInFilterListId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("IncludesFilterListId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("IncludedInFilterListId", "IncludesFilterListId");
|
||||
|
||||
b.HasIndex("IncludesFilterListId");
|
||||
|
||||
b.ToTable("Merges");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Software", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("DownloadUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("HomeUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("SupportsAbpUrlScheme")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Software");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.SoftwareSyntax", b =>
|
||||
{
|
||||
b.Property<int>("SoftwareId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("SyntaxId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("SoftwareId", "SyntaxId");
|
||||
|
||||
b.HasIndex("SyntaxId");
|
||||
|
||||
b.ToTable("SoftwareSyntaxes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Syntax", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Url")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Syntaxes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Tag", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Tags");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Dependent", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "DependencyFilterList")
|
||||
.WithMany("DependentFilterLists")
|
||||
.HasForeignKey("DependencyFilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "DependentFilterList")
|
||||
.WithMany("DependencyFilterLists")
|
||||
.HasForeignKey("DependentFilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.License", "License")
|
||||
.WithMany("FilterLists")
|
||||
.HasForeignKey("LicenseId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListLanguage", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "FilterList")
|
||||
.WithMany("FilterListLanguages")
|
||||
.HasForeignKey("FilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Language", "Language")
|
||||
.WithMany("FilterListLanguages")
|
||||
.HasForeignKey("Iso6391")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListMaintainer", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "FilterList")
|
||||
.WithMany("FilterListMaintainers")
|
||||
.HasForeignKey("FilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Maintainer", "Maintainer")
|
||||
.WithMany("FilterListMaintainers")
|
||||
.HasForeignKey("MaintainerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListSyntax", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "FilterList")
|
||||
.WithMany("FilterListSyntaxes")
|
||||
.HasForeignKey("FilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Syntax", "Syntax")
|
||||
.WithMany("FilterListSyntaxes")
|
||||
.HasForeignKey("SyntaxId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListTag", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "FilterList")
|
||||
.WithMany("FilterListTags")
|
||||
.HasForeignKey("FilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Tag", "Tag")
|
||||
.WithMany("FilterListTags")
|
||||
.HasForeignKey("TagId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListViewUrl", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "FilterList")
|
||||
.WithMany("ViewUrls")
|
||||
.HasForeignKey("FilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Fork", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "ForkFilterList")
|
||||
.WithMany("UpstreamFilterLists")
|
||||
.HasForeignKey("ForkFilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "UpstreamFilterList")
|
||||
.WithMany("ForkFilterLists")
|
||||
.HasForeignKey("UpstreamFilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Merge", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "IncludedInFilterList")
|
||||
.WithMany("IncludesFilterLists")
|
||||
.HasForeignKey("IncludedInFilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "IncludesFilterList")
|
||||
.WithMany("IncludedInFilterLists")
|
||||
.HasForeignKey("IncludesFilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.SoftwareSyntax", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Software", "Software")
|
||||
.WithMany("SoftwareSyntaxes")
|
||||
.HasForeignKey("SoftwareId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Syntax", "Syntax")
|
||||
.WithMany("SoftwareSyntaxes")
|
||||
.HasForeignKey("SyntaxId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,448 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
|
||||
{
|
||||
public partial class Initial : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Languages",
|
||||
columns: table => new
|
||||
{
|
||||
Iso6391 = table.Column<string>(fixedLength: true, maxLength: 2, nullable: false),
|
||||
Name = table.Column<string>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Languages", x => x.Iso6391);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Licenses",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Name = table.Column<string>(nullable: false),
|
||||
Url = table.Column<string>(nullable: true),
|
||||
PermitsModification = table.Column<bool>(nullable: false),
|
||||
PermitsDistribution = table.Column<bool>(nullable: false),
|
||||
PermitsCommercialUse = 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>(nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Name = table.Column<string>(nullable: false),
|
||||
Url = table.Column<string>(nullable: true),
|
||||
EmailAddress = table.Column<string>(nullable: true),
|
||||
TwitterHandle = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Maintainers", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Software",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Name = table.Column<string>(nullable: false),
|
||||
Description = table.Column<string>(nullable: true),
|
||||
HomeUrl = table.Column<string>(nullable: true),
|
||||
DownloadUrl = table.Column<string>(nullable: true),
|
||||
SupportsAbpUrlScheme = table.Column<bool>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Software", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Syntaxes",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Name = table.Column<string>(nullable: false),
|
||||
Description = table.Column<string>(nullable: true),
|
||||
Url = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Syntaxes", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Tags",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Name = table.Column<string>(nullable: false),
|
||||
Description = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Tags", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "FilterLists",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Name = table.Column<string>(nullable: false),
|
||||
Description = table.Column<string>(nullable: true),
|
||||
LicenseId = table.Column<int>(nullable: true),
|
||||
HomeUrl = table.Column<string>(nullable: true),
|
||||
OnionUrl = table.Column<string>(nullable: true),
|
||||
PolicyUrl = table.Column<string>(nullable: true),
|
||||
SubmissionUrl = table.Column<string>(nullable: true),
|
||||
IssuesUrl = table.Column<string>(nullable: true),
|
||||
ForumUrl = table.Column<string>(nullable: true),
|
||||
ChatUrl = table.Column<string>(nullable: true),
|
||||
EmailAddress = table.Column<string>(nullable: true),
|
||||
DonateUrl = table.Column<string>(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);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SoftwareSyntaxes",
|
||||
columns: table => new
|
||||
{
|
||||
SoftwareId = table.Column<int>(nullable: false),
|
||||
SyntaxId = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SoftwareSyntaxes", x => new { x.SoftwareId, x.SyntaxId });
|
||||
table.ForeignKey(
|
||||
name: "FK_SoftwareSyntaxes_Software_SoftwareId",
|
||||
column: x => x.SoftwareId,
|
||||
principalTable: "Software",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_SoftwareSyntaxes_Syntaxes_SyntaxId",
|
||||
column: x => x.SyntaxId,
|
||||
principalTable: "Syntaxes",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Dependents",
|
||||
columns: table => new
|
||||
{
|
||||
DependencyFilterListId = table.Column<int>(nullable: false),
|
||||
DependentFilterListId = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Dependents", x => new { x.DependencyFilterListId, x.DependentFilterListId });
|
||||
table.ForeignKey(
|
||||
name: "FK_Dependents_FilterLists_DependencyFilterListId",
|
||||
column: x => x.DependencyFilterListId,
|
||||
principalTable: "FilterLists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Dependents_FilterLists_DependentFilterListId",
|
||||
column: x => x.DependentFilterListId,
|
||||
principalTable: "FilterLists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "FilterListLanguages",
|
||||
columns: table => new
|
||||
{
|
||||
FilterListId = table.Column<int>(nullable: false),
|
||||
Iso6391 = table.Column<string>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_FilterListLanguages", x => new { x.FilterListId, x.Iso6391 });
|
||||
table.ForeignKey(
|
||||
name: "FK_FilterListLanguages_FilterLists_FilterListId",
|
||||
column: x => x.FilterListId,
|
||||
principalTable: "FilterLists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_FilterListLanguages_Languages_Iso6391",
|
||||
column: x => x.Iso6391,
|
||||
principalTable: "Languages",
|
||||
principalColumn: "Iso6391",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "FilterListMaintainers",
|
||||
columns: table => new
|
||||
{
|
||||
FilterListId = table.Column<int>(nullable: false),
|
||||
MaintainerId = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_FilterListMaintainers", x => new { x.FilterListId, x.MaintainerId });
|
||||
table.ForeignKey(
|
||||
name: "FK_FilterListMaintainers_FilterLists_FilterListId",
|
||||
column: x => x.FilterListId,
|
||||
principalTable: "FilterLists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_FilterListMaintainers_Maintainers_MaintainerId",
|
||||
column: x => x.MaintainerId,
|
||||
principalTable: "Maintainers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "FilterListSyntaxes",
|
||||
columns: table => new
|
||||
{
|
||||
FilterListId = table.Column<int>(nullable: false),
|
||||
SyntaxId = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_FilterListSyntaxes", x => new { x.FilterListId, x.SyntaxId });
|
||||
table.ForeignKey(
|
||||
name: "FK_FilterListSyntaxes_FilterLists_FilterListId",
|
||||
column: x => x.FilterListId,
|
||||
principalTable: "FilterLists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_FilterListSyntaxes_Syntaxes_SyntaxId",
|
||||
column: x => x.SyntaxId,
|
||||
principalTable: "Syntaxes",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "FilterListTags",
|
||||
columns: table => new
|
||||
{
|
||||
FilterListId = table.Column<int>(nullable: false),
|
||||
TagId = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_FilterListTags", x => new { x.FilterListId, x.TagId });
|
||||
table.ForeignKey(
|
||||
name: "FK_FilterListTags_FilterLists_FilterListId",
|
||||
column: x => x.FilterListId,
|
||||
principalTable: "FilterLists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_FilterListTags_Tags_TagId",
|
||||
column: x => x.TagId,
|
||||
principalTable: "Tags",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "FilterListViewUrls",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
FilterListId = table.Column<int>(nullable: false),
|
||||
SegmentNumber = table.Column<short>(nullable: false, defaultValue: (short)1),
|
||||
Primariness = table.Column<short>(nullable: false, defaultValue: (short)1),
|
||||
Url = table.Column<string>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_FilterListViewUrls", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_FilterListViewUrls_FilterLists_FilterListId",
|
||||
column: x => x.FilterListId,
|
||||
principalTable: "FilterLists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Forks",
|
||||
columns: table => new
|
||||
{
|
||||
UpstreamFilterListId = table.Column<int>(nullable: false),
|
||||
ForkFilterListId = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Forks", x => new { x.UpstreamFilterListId, x.ForkFilterListId });
|
||||
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
|
||||
{
|
||||
IncludedInFilterListId = table.Column<int>(nullable: false),
|
||||
IncludesFilterListId = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Merges", x => new { x.IncludedInFilterListId, x.IncludesFilterListId });
|
||||
table.ForeignKey(
|
||||
name: "FK_Merges_FilterLists_IncludedInFilterListId",
|
||||
column: x => x.IncludedInFilterListId,
|
||||
principalTable: "FilterLists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Merges_FilterLists_IncludesFilterListId",
|
||||
column: x => x.IncludesFilterListId,
|
||||
principalTable: "FilterLists",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Dependents_DependentFilterListId",
|
||||
table: "Dependents",
|
||||
column: "DependentFilterListId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_FilterListLanguages_Iso6391",
|
||||
table: "FilterListLanguages",
|
||||
column: "Iso6391");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_FilterListMaintainers_MaintainerId",
|
||||
table: "FilterListMaintainers",
|
||||
column: "MaintainerId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_FilterListSyntaxes_SyntaxId",
|
||||
table: "FilterListSyntaxes",
|
||||
column: "SyntaxId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_FilterListTags_TagId",
|
||||
table: "FilterListTags",
|
||||
column: "TagId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_FilterListViewUrls_FilterListId_SegmentNumber_Primariness",
|
||||
table: "FilterListViewUrls",
|
||||
columns: new[] { "FilterListId", "SegmentNumber", "Primariness" },
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_FilterLists_LicenseId",
|
||||
table: "FilterLists",
|
||||
column: "LicenseId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Forks_ForkFilterListId",
|
||||
table: "Forks",
|
||||
column: "ForkFilterListId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Merges_IncludesFilterListId",
|
||||
table: "Merges",
|
||||
column: "IncludesFilterListId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SoftwareSyntaxes_SyntaxId",
|
||||
table: "SoftwareSyntaxes",
|
||||
column: "SyntaxId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Dependents");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "FilterListLanguages");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "FilterListMaintainers");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "FilterListSyntaxes");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "FilterListTags");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "FilterListViewUrls");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Forks");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Merges");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "SoftwareSyntaxes");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Languages");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Maintainers");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Tags");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "FilterLists");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Software");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Syntaxes");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Licenses");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,501 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using FilterLists.Directory.Infrastructure.Persistence.Queries.Context;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
|
||||
{
|
||||
[DbContext(typeof(QueryDbContext))]
|
||||
partial class QueryDbContextModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
|
||||
.HasAnnotation("ProductVersion", "3.1.9")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Dependent", b =>
|
||||
{
|
||||
b.Property<int>("DependencyFilterListId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("DependentFilterListId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("DependencyFilterListId", "DependentFilterListId");
|
||||
|
||||
b.HasIndex("DependentFilterListId");
|
||||
|
||||
b.ToTable("Dependents");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("ChatUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("DonateUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("EmailAddress")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ForumUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("HomeUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("IssuesUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("LicenseId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("OnionUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("PolicyUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("SubmissionUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("LicenseId");
|
||||
|
||||
b.ToTable("FilterLists");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListLanguage", b =>
|
||||
{
|
||||
b.Property<int>("FilterListId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Iso6391")
|
||||
.HasColumnType("character varying(2)");
|
||||
|
||||
b.HasKey("FilterListId", "Iso6391");
|
||||
|
||||
b.HasIndex("Iso6391");
|
||||
|
||||
b.ToTable("FilterListLanguages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListMaintainer", b =>
|
||||
{
|
||||
b.Property<int>("FilterListId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("MaintainerId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("FilterListId", "MaintainerId");
|
||||
|
||||
b.HasIndex("MaintainerId");
|
||||
|
||||
b.ToTable("FilterListMaintainers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListSyntax", b =>
|
||||
{
|
||||
b.Property<int>("FilterListId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("SyntaxId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("FilterListId", "SyntaxId");
|
||||
|
||||
b.HasIndex("SyntaxId");
|
||||
|
||||
b.ToTable("FilterListSyntaxes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListTag", b =>
|
||||
{
|
||||
b.Property<int>("FilterListId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("TagId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("FilterListId", "TagId");
|
||||
|
||||
b.HasIndex("TagId");
|
||||
|
||||
b.ToTable("FilterListTags");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListViewUrl", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int>("FilterListId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<short>("Primariness")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("smallint")
|
||||
.HasDefaultValue((short)1);
|
||||
|
||||
b.Property<short>("SegmentNumber")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("smallint")
|
||||
.HasDefaultValue((short)1);
|
||||
|
||||
b.Property<string>("Url")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("FilterListId", "SegmentNumber", "Primariness")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("FilterListViewUrls");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Fork", b =>
|
||||
{
|
||||
b.Property<int>("UpstreamFilterListId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("ForkFilterListId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("UpstreamFilterListId", "ForkFilterListId");
|
||||
|
||||
b.HasIndex("ForkFilterListId");
|
||||
|
||||
b.ToTable("Forks");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Language", b =>
|
||||
{
|
||||
b.Property<string>("Iso6391")
|
||||
.HasColumnType("character(2)")
|
||||
.IsFixedLength(true)
|
||||
.HasMaxLength(2);
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Iso6391");
|
||||
|
||||
b.ToTable("Languages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.License", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("PermitsCommercialUse")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("PermitsDistribution")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("PermitsModification")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("Url")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Licenses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Maintainer", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("EmailAddress")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("TwitterHandle")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Url")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Maintainers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Merge", b =>
|
||||
{
|
||||
b.Property<int>("IncludedInFilterListId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("IncludesFilterListId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("IncludedInFilterListId", "IncludesFilterListId");
|
||||
|
||||
b.HasIndex("IncludesFilterListId");
|
||||
|
||||
b.ToTable("Merges");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Software", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("DownloadUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("HomeUrl")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("SupportsAbpUrlScheme")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Software");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.SoftwareSyntax", b =>
|
||||
{
|
||||
b.Property<int>("SoftwareId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("SyntaxId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("SoftwareId", "SyntaxId");
|
||||
|
||||
b.HasIndex("SyntaxId");
|
||||
|
||||
b.ToTable("SoftwareSyntaxes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Syntax", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Url")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Syntaxes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Tag", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Tags");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Dependent", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "DependencyFilterList")
|
||||
.WithMany("DependentFilterLists")
|
||||
.HasForeignKey("DependencyFilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "DependentFilterList")
|
||||
.WithMany("DependencyFilterLists")
|
||||
.HasForeignKey("DependentFilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.License", "License")
|
||||
.WithMany("FilterLists")
|
||||
.HasForeignKey("LicenseId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListLanguage", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "FilterList")
|
||||
.WithMany("FilterListLanguages")
|
||||
.HasForeignKey("FilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Language", "Language")
|
||||
.WithMany("FilterListLanguages")
|
||||
.HasForeignKey("Iso6391")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListMaintainer", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "FilterList")
|
||||
.WithMany("FilterListMaintainers")
|
||||
.HasForeignKey("FilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Maintainer", "Maintainer")
|
||||
.WithMany("FilterListMaintainers")
|
||||
.HasForeignKey("MaintainerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListSyntax", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "FilterList")
|
||||
.WithMany("FilterListSyntaxes")
|
||||
.HasForeignKey("FilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Syntax", "Syntax")
|
||||
.WithMany("FilterListSyntaxes")
|
||||
.HasForeignKey("SyntaxId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListTag", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "FilterList")
|
||||
.WithMany("FilterListTags")
|
||||
.HasForeignKey("FilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Tag", "Tag")
|
||||
.WithMany("FilterListTags")
|
||||
.HasForeignKey("TagId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListViewUrl", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "FilterList")
|
||||
.WithMany("ViewUrls")
|
||||
.HasForeignKey("FilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Fork", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "ForkFilterList")
|
||||
.WithMany("UpstreamFilterLists")
|
||||
.HasForeignKey("ForkFilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "UpstreamFilterList")
|
||||
.WithMany("ForkFilterLists")
|
||||
.HasForeignKey("UpstreamFilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Merge", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "IncludedInFilterList")
|
||||
.WithMany("IncludesFilterLists")
|
||||
.HasForeignKey("IncludedInFilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "IncludesFilterList")
|
||||
.WithMany("IncludedInFilterLists")
|
||||
.HasForeignKey("IncludesFilterListId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.SoftwareSyntax", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Software", "Software")
|
||||
.WithMany("SoftwareSyntaxes")
|
||||
.HasForeignKey("SoftwareId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Syntax", "Syntax")
|
||||
.WithMany("SoftwareSyntaxes")
|
||||
.HasForeignKey("SyntaxId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue