refactor(dir): ♻ use postgres snake_case naming convention

This commit is contained in:
Collin M. Barrett 2021-11-16 16:20:46 -06:00
parent 932a604496
commit 5bec0a1b7b
20 changed files with 915 additions and 753360 deletions

View file

@ -1,448 +0,0 @@
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>(type: "character(2)", fixedLength: true, maxLength: 2, nullable: false),
Name = table.Column<string>(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Languages", x => x.Iso6391);
});
migrationBuilder.CreateTable(
name: "Licenses",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Name = table.Column<string>(type: "text", nullable: false),
Url = table.Column<string>(type: "text", nullable: true),
PermitsModification = table.Column<bool>(type: "boolean", nullable: false),
PermitsDistribution = table.Column<bool>(type: "boolean", nullable: false),
PermitsCommercialUse = table.Column<bool>(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Licenses", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Maintainers",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Name = table.Column<string>(type: "text", nullable: false),
Url = table.Column<string>(type: "text", nullable: true),
EmailAddress = table.Column<string>(type: "text", nullable: true),
TwitterHandle = table.Column<string>(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Maintainers", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Software",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Name = table.Column<string>(type: "text", nullable: false),
Description = table.Column<string>(type: "text", nullable: true),
HomeUrl = table.Column<string>(type: "text", nullable: true),
DownloadUrl = table.Column<string>(type: "text", nullable: true),
SupportsAbpUrlScheme = table.Column<bool>(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Software", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Syntaxes",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Name = table.Column<string>(type: "text", nullable: false),
Description = table.Column<string>(type: "text", nullable: true),
Url = table.Column<string>(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Syntaxes", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Tags",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Name = table.Column<string>(type: "text", nullable: false),
Description = table.Column<string>(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Tags", x => x.Id);
});
migrationBuilder.CreateTable(
name: "FilterLists",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Name = table.Column<string>(type: "text", nullable: false),
Description = table.Column<string>(type: "text", nullable: true),
LicenseId = table.Column<int>(type: "integer", nullable: true),
HomeUrl = table.Column<string>(type: "text", nullable: true),
OnionUrl = table.Column<string>(type: "text", nullable: true),
PolicyUrl = table.Column<string>(type: "text", nullable: true),
SubmissionUrl = table.Column<string>(type: "text", nullable: true),
IssuesUrl = table.Column<string>(type: "text", nullable: true),
ForumUrl = table.Column<string>(type: "text", nullable: true),
ChatUrl = table.Column<string>(type: "text", nullable: true),
EmailAddress = table.Column<string>(type: "text", nullable: true),
DonateUrl = 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);
});
migrationBuilder.CreateTable(
name: "SoftwareSyntaxes",
columns: table => new
{
SoftwareId = table.Column<int>(type: "integer", nullable: false),
SyntaxId = table.Column<int>(type: "integer", 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>(type: "integer", nullable: false),
DependentFilterListId = table.Column<int>(type: "integer", 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>(type: "integer", nullable: false),
Iso6391 = table.Column<string>(type: "character(2)", 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>(type: "integer", nullable: false),
MaintainerId = table.Column<int>(type: "integer", 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>(type: "integer", nullable: false),
SyntaxId = table.Column<int>(type: "integer", 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>(type: "integer", nullable: false),
TagId = table.Column<int>(type: "integer", 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>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
FilterListId = table.Column<int>(type: "integer", nullable: false),
SegmentNumber = table.Column<short>(type: "smallint", nullable: false, defaultValue: (short)1),
Primariness = table.Column<short>(type: "smallint", nullable: false, defaultValue: (short)1),
Url = table.Column<string>(type: "text", 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>(type: "integer", nullable: false),
ForkFilterListId = table.Column<int>(type: "integer", 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>(type: "integer", nullable: false),
IncludesFilterListId = table.Column<int>(type: "integer", 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");
}
}
}

View file

@ -1,122 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
{
public partial class _2662 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.InsertData(
table: "FilterListTags",
columns: new[] { "FilterListId", "TagId" },
values: new object[,]
{
{ 2537, 6 },
{ 2537, 7 },
{ 2538, 6 },
{ 2538, 7 }
});
migrationBuilder.UpdateData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2537,
column: "Description",
value: "Block malware, phishing, and scams for a more secure computer");
migrationBuilder.UpdateData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2538,
column: "Description",
value: "Block malware, phishing, and scams for a more secure computer (HOSTS version - not for uBlock Origin)");
migrationBuilder.InsertData(
table: "FilterLists",
columns: new[] { "Id", "ChatUrl", "Description", "DonateUrl", "EmailAddress", "ForumUrl", "HomeUrl", "IssuesUrl", "LicenseId", "Name", "OnionUrl", "PolicyUrl", "SubmissionUrl" },
values: new object[] { 2541, null, "Block malware, phishing, and scams for a more secure computer (Domains version)", null, null, null, "https://github.com/iam-py-test/my_filters_001", "https://github.com/iam-py-test/my_filters_001/issues/", 28, "Malicious website blocklist (Domains)", null, null, null });
migrationBuilder.InsertData(
table: "FilterListTags",
columns: new[] { "FilterListId", "TagId" },
values: new object[,]
{
{ 2541, 6 },
{ 2541, 7 }
});
migrationBuilder.InsertData(
table: "FilterListViewUrls",
columns: new[] { "Id", "FilterListId", "Primariness", "Url" },
values: new object[,]
{
{ 2760, 2541, (short)1, "https://raw.githubusercontent.com/iam-py-test/my_filters_001/main/Alternative list formats/antimalware_domains.txt" },
{ 2761, 2541, (short)2, "https://iam-py-test.github.io/my_filters_001/Alternative list formats/antimalware_domains.txt" }
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2537, 6 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2537, 7 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2538, 6 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2538, 7 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2541, 6 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2541, 7 });
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2760);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2761);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2541);
migrationBuilder.UpdateData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2537,
column: "Description",
value: "Block malware, phishing, and scams for a more secure browser");
migrationBuilder.UpdateData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2538,
column: "Description",
value: "Block malware, phishing, and scams for a more secure browser (HOSTS version - not for uBlock Origin)");
}
}
}

View file

@ -1,743 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
{
public partial class _2664 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 379);
migrationBuilder.InsertData(
table: "FilterListMaintainers",
columns: new[] { "FilterListId", "MaintainerId" },
values: new object[] { 2434, 165 });
migrationBuilder.UpdateData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 380,
column: "Primariness",
value: (short)1);
migrationBuilder.UpdateData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2002,
column: "Url",
value: "https://www.thedumbterminal.co.uk/files/services/squidblockedsites/blocked.txt");
migrationBuilder.UpdateData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 1814,
column: "Name",
value: "Remover for Mainstream Tabloid, Alt-Right and Antivaxx Sites");
migrationBuilder.InsertData(
table: "FilterLists",
columns: new[] { "Id", "ChatUrl", "Description", "DonateUrl", "EmailAddress", "ForumUrl", "HomeUrl", "IssuesUrl", "LicenseId", "Name", "OnionUrl", "PolicyUrl", "SubmissionUrl" },
values: new object[,]
{
{ 2542, null, null, null, null, "https://forum.adguard.com/index.php?categories/filter-rules.66/", "https://github.com/AdguardTeam/AdguardFilters", "https://github.com/AdguardTeam/AdguardFilters/issues", 12, "AdGuard Annoyances Filter - Subscriptions and Newsletters Only", null, "https://kb.adguard.com/en/general/adguard-filter-policy", null },
{ 2543, null, "HackerList is a RBL list of IP addresses that have attempted to hack my servers.", null, "soren@smallbusinesstech.net", null, "https://www.smallbusinesstech.net/pfblocker-lists/", null, 4, "HackerList", null, null, null },
{ 2544, null, "SpamList is a RBL list of IP addresses that have sent my email server spam that made it through my other spam filtering. It works well when combined with SpamAssassin on the mail server.", null, "soren@smallbusinesstech.net", null, "https://www.smallbusinesstech.net/pfblocker-lists/", null, 4, "SpamList", null, null, null },
{ 2545, null, "Whitelisted domains (and their subdomains) when enabling Privacy -> Allow Affiliate & Tracking Links.", null, null, null, "https://github.com/nextdns/metadata", "https://github.com/nextdns/metadata/issues", null, "NextDNS Affiliate Tracking Domains", null, null, null },
{ 2546, null, "It turns out, if your device has bloated softwares (i.e. Apps that comes pre-installed and you can't remove them unless you root your device), you're forced into keeping those services running. Manufacturers like Huawei have stopped providing bootloader unlock codes thereby not allowing you to root your device. So, the best solution is to setup a local proxy server that blocks the connection.", null, "bhattdeep38@gmail.com", null, "https://github.com/deep-bhatt/huawei-block-list", null, 2, "Huawei Block List", null, null, null },
{ 2547, null, "Throw away email addresses (burner emails) are great for single use signups where you would like the content but rather not give up your email. I'm okay with people using burner email addresses to get my free content, I just need to be able to filter them out of my list so it doesn't drive up bounces and hurt deliverability. Please send a PR with any new ones you find.", null, "wes@wesbos.com", null, "https://github.com/wesbos/burner-email-providers", "https://github.com/wesbos/burner-email-providers/issues", 2, "A list of burner email providers", null, null, null },
{ 2548, null, "List of IoCs being utilized by Ransomwares.", null, null, null, "https://kriskintel.com/", null, null, "Krisk Intel - KTIP Ransomware Feeds", null, null, null },
{ 2549, null, null, null, null, null, "https://github.com/brijrajparmar27/host-sources", null, null, "Hosts for DNS Level Blockers - Adult", null, null, null },
{ 2550, null, null, null, "zelo72@dismail.de", null, "https://github.com/Zelo72/adguard", null, 11, "Zelo72's Referral Whitelist", null, null, null },
{ 2551, null, null, null, null, null, "https://github.com/stamparm/maltrail", "https://github.com/stamparm/maltrail/issues", 2, "Maltrail - I2P", null, null, null },
{ 2552, null, null, null, null, null, "https://github.com/stamparm/maltrail", "https://github.com/stamparm/maltrail/issues", 2, "Maltrail - IP info", null, null, null },
{ 2553, null, null, null, null, null, "https://github.com/stamparm/maltrail", "https://github.com/stamparm/maltrail/issues", 2, "Maltrail - Parking sites", null, null, null },
{ 2554, null, "In the early 2010's, it was common for Windows games to be hardcoded to require connections to first-party servers to work properly. To no one's surprise besides the game publishers, this began causing problems later on when the servers shut down, with games stuttering, freezing, or failing to start. This list implements community fixes to make those games playable and non-stuttering again.", "https://sproutsluckycorner.wordpress.com/2017/11/14/my-work-and-contact-resume/#donations", "imreeil42@gmail.com", null, "https://github.com/DandelionSprout/adfilt", "https://github.com/DandelionSprout/adfilt/issues", 35, "List for preventing games from freezing when pinging dead servers", null, null, null },
{ 2555, null, "This list target international websites that clutter Mastodon public timelines and userfeeds with misinformation, unfounded articles, and/or contempt for humanity.", "https://sproutsluckycorner.wordpress.com/2017/11/14/my-work-and-contact-resume/#donations", "imreeil42@gmail.com", null, "https://github.com/DandelionSprout/adfilt", "https://github.com/DandelionSprout/adfilt/issues", 35, "Remover for Mainstream Tabloid, Alt-Right and Antivaxx Sites - Mastodon", null, null, null },
{ 2556, null, "This list target international websites that clutter Mastodon public timelines and userfeeds with misinformation, unfounded articles, and/or contempt for humanity.", "https://sproutsluckycorner.wordpress.com/2017/11/14/my-work-and-contact-resume/#donations", "imreeil42@gmail.com", null, "https://github.com/DandelionSprout/adfilt", "https://github.com/DandelionSprout/adfilt/issues", 34, "ClearURLs for uBlock Origin", null, null, null },
{ 2557, null, "Blocklist based on articles published by security research groups.", null, null, null, "https://github.com/scafroglia93/blocklists/", "https://github.com/scafroglia93/blocklists/issues", null, "scafroglia93's Hosts Blocklists - Malware traffic", null, null, null },
{ 2558, null, "This is just a blocklist for Pi-Hole that I maintain for me personally. You can subscribe to it if you want, but I give no guarantee it doesn't break anything you need, indeed it does break some stuff, like Google Plus, but they are all things that I don't use anyway. Again, these are things I want to block on my own networks.", null, null, null, "https://github.com/Knuschberkeks/Knuschberblock/", null, 2, "Knuschberblock", null, null, null },
{ 2559, null, null, null, "huzunluartemis@tuta.io", null, "https://github.com/HuzunluArtemis/TurkishAdblockList", null, 4, "HuzunluArtemis Turkish host adlist", null, null, null },
{ 2560, null, null, null, "huzunluartemis@tuta.io", null, "https://github.com/HuzunluArtemis/TurkishAdblockList", null, 4, "HuzunluArtemis Turkish elemental adlist", null, null, null },
{ 2561, null, null, null, "huzunluartemis@tuta.io", null, "https://github.com/HuzunluArtemis/TurkishAdblockList", null, 4, "HuzunluArtemis Turkish Bad IPlist", null, null, null },
{ 2562, null, "Unofficial stores (Aptoide, Apkpure, GetJar...); Cracked & modded APK sources; Fake & unofficial websites; Malvertising & harmful websites; Closed source apps outside trusted stores (Lucky Patcher, YouTube Vanced...)", null, null, null, "https://github.com/furkun/AndroidSecurityHosts", null, 2, "Android Security Hosts (Hosts)", null, null, null },
{ 2563, null, "Unofficial stores (Aptoide, Apkpure, GetJar...); Cracked & modded APK sources; Fake & unofficial websites; Malvertising & harmful websites; Closed source apps outside trusted stores (Lucky Patcher, YouTube Vanced...)", null, null, null, "https://github.com/furkun/AndroidSecurityHosts", null, 2, "Android Security Hosts (Domains)", null, null, null }
});
migrationBuilder.InsertData(
table: "FilterListLanguages",
columns: new[] { "FilterListId", "Iso6391" },
values: new object[,]
{
{ 2559, "tr" },
{ 2560, "tr" },
{ 2561, "tr" }
});
migrationBuilder.InsertData(
table: "FilterListMaintainers",
columns: new[] { "FilterListId", "MaintainerId" },
values: new object[,]
{
{ 2542, 46 },
{ 2554, 22 },
{ 2555, 22 },
{ 2556, 165 }
});
migrationBuilder.InsertData(
table: "FilterListSyntaxes",
columns: new[] { "FilterListId", "SyntaxId" },
values: new object[,]
{
{ 2542, 6 },
{ 2543, 9 },
{ 2544, 9 },
{ 2545, 50 },
{ 2546, 2 },
{ 2547, 2 },
{ 2548, 2 },
{ 2548, 9 },
{ 2549, 1 },
{ 2550, 47 },
{ 2551, 2 },
{ 2552, 2 },
{ 2553, 9 },
{ 2553, 34 },
{ 2554, 6 },
{ 2554, 47 },
{ 2555, 2 },
{ 2556, 4 },
{ 2557, 2 },
{ 2558, 2 },
{ 2559, 1 },
{ 2560, 3 },
{ 2560, 4 },
{ 2561, 9 },
{ 2562, 1 },
{ 2563, 2 }
});
migrationBuilder.InsertData(
table: "FilterListTags",
columns: new[] { "FilterListId", "TagId" },
values: new object[,]
{
{ 2542, 28 },
{ 2543, 20 },
{ 2544, 20 },
{ 2545, 10 },
{ 2546, 3 },
{ 2546, 19 },
{ 2547, 20 },
{ 2548, 6 },
{ 2549, 11 },
{ 2550, 10 },
{ 2551, 12 },
{ 2552, 15 },
{ 2553, 6 },
{ 2554, 15 },
{ 2555, 25 },
{ 2556, 3 },
{ 2557, 6 },
{ 2558, 3 },
{ 2559, 3 },
{ 2560, 3 },
{ 2561, 3 },
{ 2562, 15 },
{ 2563, 15 }
});
migrationBuilder.InsertData(
table: "FilterListViewUrls",
columns: new[] { "Id", "FilterListId", "Primariness", "Url" },
values: new object[,]
{
{ 2762, 2542, (short)1, "https://raw.githubusercontent.com/AdguardTeam/AdguardFilters/master/AnnoyancesFilter/sections/subscriptions.txt" },
{ 2763, 2543, (short)1, "https://pfblockerlists.smallbusinesstech.net/hackerlist.txt" },
{ 2764, 2544, (short)1, "https://pfblockerlists.smallbusinesstech.net/spamlist.txt" },
{ 2765, 2545, (short)1, "https://raw.githubusercontent.com/nextdns/metadata/master/privacy/affiliate-tracking-domains" },
{ 2766, 2546, (short)1, "https://raw.githubusercontent.com/deep-bhatt/huawei-block-list/master/huawei-block-host.txt" },
{ 2767, 2547, (short)1, "https://raw.githubusercontent.com/wesbos/burner-email-providers/master/emails.txt" },
{ 2768, 2548, (short)1, "https://kriskintel.com/feeds/ktip_ransomware_feeds.txt" },
{ 2769, 2549, (short)1, "https://raw.githubusercontent.com/brijrajparmar27/host-sources/master/Porn/hosts" },
{ 2770, 2550, (short)1, "https://raw.githubusercontent.com/Zelo72/adguard/main/whitelist.referral.adguard" },
{ 2771, 2551, (short)1, "https://github.com/stamparm/maltrail/blob/master/trails/static/suspicious/i2p.txt" },
{ 2772, 2552, (short)1, "https://github.com/stamparm/maltrail/blob/master/trails/static/suspicious/ipinfo.txt" },
{ 2773, 2553, (short)1, "https://github.com/stamparm/maltrail/blob/master/trails/static/suspicious/parking_site.txt" },
{ 2774, 2554, (short)1, "https://raw.githubusercontent.com/DandelionSprout/adfilt/master/DeadServerGamePingList.txt" },
{ 2775, 2554, (short)2, "https://gitlab.com/DandelionSprout/adfilt/-/raw/master/DeadServerGamePingList.txt" },
{ 2776, 2555, (short)1, "https://raw.githubusercontent.com/DandelionSprout/adfilt/master/Sensitive lists/TabloidRemover-MastodonCategoryForImports.csv" },
{ 2777, 2555, (short)2, "https://gitlab.com/DandelionSprout/adfilt/-/raw/master/Sensitive lists/TabloidRemover-MastodonCategoryForImports.csv" },
{ 2778, 2556, (short)1, "https://raw.githubusercontent.com/DandelionSprout/adfilt/master/ClearURLs for uBo/clear_urls_uboified.txt" },
{ 2779, 2556, (short)2, "https://gitlab.com/DandelionSprout/adfilt/-/raw/master/ClearURLs for uBo/clear_urls_uboified.txt" },
{ 2780, 2557, (short)1, "https://raw.githubusercontent.com/scafroglia93/blocklists/master/blocklists-malware-traffic.txt" },
{ 2781, 2558, (short)1, "https://raw.githubusercontent.com/Knuschberkeks/Knuschberblock/main/Knuschberblock.txt" },
{ 2782, 2559, (short)1, "https://raw.githubusercontent.com/huzunluartemis/TurkishAdblockList/main/src/HostsList.txt" },
{ 2783, 2560, (short)1, "https://raw.githubusercontent.com/huzunluartemis/TurkishAdblockList/main/src/ElementalList.txt" },
{ 2784, 2561, (short)1, "https://raw.githubusercontent.com/huzunluartemis/TurkishAdblockList/main/src/BadIpList.txt" },
{ 2785, 2562, (short)1, "https://raw.githubusercontent.com/furkun/AndroidSecurityHosts/main/hosts" },
{ 2786, 2563, (short)1, "https://raw.githubusercontent.com/furkun/AndroidSecurityHosts/main/domains.txt" },
{ 2787, 2556, (short)3, "https://codeberg.org/rusty-snake/firefox-config/src/branch/main/assets/uBlockOrigin:queryprune.txt" }
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "FilterListLanguages",
keyColumns: new[] { "FilterListId", "Iso6391" },
keyValues: new object[] { 2559, "tr" });
migrationBuilder.DeleteData(
table: "FilterListLanguages",
keyColumns: new[] { "FilterListId", "Iso6391" },
keyValues: new object[] { 2560, "tr" });
migrationBuilder.DeleteData(
table: "FilterListLanguages",
keyColumns: new[] { "FilterListId", "Iso6391" },
keyValues: new object[] { 2561, "tr" });
migrationBuilder.DeleteData(
table: "FilterListMaintainers",
keyColumns: new[] { "FilterListId", "MaintainerId" },
keyValues: new object[] { 2434, 165 });
migrationBuilder.DeleteData(
table: "FilterListMaintainers",
keyColumns: new[] { "FilterListId", "MaintainerId" },
keyValues: new object[] { 2542, 46 });
migrationBuilder.DeleteData(
table: "FilterListMaintainers",
keyColumns: new[] { "FilterListId", "MaintainerId" },
keyValues: new object[] { 2554, 22 });
migrationBuilder.DeleteData(
table: "FilterListMaintainers",
keyColumns: new[] { "FilterListId", "MaintainerId" },
keyValues: new object[] { 2555, 22 });
migrationBuilder.DeleteData(
table: "FilterListMaintainers",
keyColumns: new[] { "FilterListId", "MaintainerId" },
keyValues: new object[] { 2556, 165 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2542, 6 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2543, 9 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2544, 9 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2545, 50 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2546, 2 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2547, 2 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2548, 2 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2548, 9 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2549, 1 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2550, 47 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2551, 2 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2552, 2 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2553, 9 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2553, 34 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2554, 6 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2554, 47 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2555, 2 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2556, 4 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2557, 2 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2558, 2 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2559, 1 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2560, 3 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2560, 4 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2561, 9 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2562, 1 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2563, 2 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2542, 28 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2543, 20 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2544, 20 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2545, 10 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2546, 3 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2546, 19 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2547, 20 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2548, 6 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2549, 11 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2550, 10 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2551, 12 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2552, 15 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2553, 6 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2554, 15 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2555, 25 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2556, 3 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2557, 6 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2558, 3 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2559, 3 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2560, 3 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2561, 3 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2562, 15 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2563, 15 });
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2762);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2763);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2764);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2765);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2766);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2767);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2768);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2769);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2770);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2771);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2772);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2773);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2774);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2775);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2776);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2777);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2778);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2779);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2780);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2781);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2782);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2783);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2784);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2785);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2786);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2787);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2542);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2543);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2544);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2545);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2546);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2547);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2548);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2549);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2550);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2551);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2552);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2553);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2554);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2555);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2556);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2557);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2558);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2559);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2560);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2561);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2562);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2563);
migrationBuilder.UpdateData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 380,
column: "Primariness",
value: (short)2);
migrationBuilder.UpdateData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2002,
column: "Url",
value: "http://www.thedumbterminal.co.uk/files/services/squidblockedsites/blocked.txt");
migrationBuilder.InsertData(
table: "FilterListViewUrls",
columns: new[] { "Id", "FilterListId", "Primariness", "SegmentNumber", "Url" },
values: new object[] { 379, 251, (short)1, (short)0, "http://abp.mozilla-hispano.org/nauscopio/filtros.txt" });
migrationBuilder.UpdateData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 1814,
column: "Name",
value: "Remover for Mainstream Tabloid and Alt-Right Sites");
}
}
}

View file

@ -1,25 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
{
public partial class _2665 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.InsertData(
table: "FilterListMaintainers",
columns: new[] { "FilterListId", "MaintainerId" },
values: new object[] { 2541, 165 });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "FilterListMaintainers",
keyColumns: new[] { "FilterListId", "MaintainerId" },
keyValues: new object[] { 2541, 165 });
}
}
}

View file

@ -1,208 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
{
public partial class _2666 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.InsertData(
table: "FilterLists",
columns: new[] { "Id", "ChatUrl", "Description", "DonateUrl", "EmailAddress", "ForumUrl", "HomeUrl", "IssuesUrl", "LicenseId", "Name", "OnionUrl", "PolicyUrl", "SubmissionUrl" },
values: new object[,]
{
{ 2564, null, "Filters that accept cookies/GDPR/privacy policy on Polish websites.", null, "contact-project+filtersheroes-pccassets-30920945-issue-@incoming.gitlab.com", "https://www.reddit.com/r/PolishCookieConsent", "https://github.com/FiltersHeroes/PCCassets", "https://github.com/FiltersHeroes/PCCassets/issues", 33, "Polish Cookie Database", null, null, null },
{ 2565, null, "Filters that accept cookies/GDPR/privacy policy on European websites (based on I don't care about cookies).", null, "contact-project+filtersheroes-pccassets-30920945-issue-@incoming.gitlab.com", "https://www.reddit.com/r/PolishCookieConsent", "https://github.com/FiltersHeroes/PCCassets", "https://github.com/FiltersHeroes/PCCassets/issues", 4, "European Cookie Database", null, null, null }
});
migrationBuilder.InsertData(
table: "Software",
columns: new[] { "Id", "Description", "DownloadUrl", "HomeUrl", "Name", "SupportsAbpUrlScheme" },
values: new object[] { 47, "Automatically accepts cookie policy/GDPR on websites.", "https://github.com/FiltersHeroes/PolishCookieConsent/#how-to-install-it", "https://github.com/FiltersHeroes/PolishCookieConsent", "Polish Cookie Consent", false });
migrationBuilder.InsertData(
table: "Syntaxes",
columns: new[] { "Id", "Description", "Name", "Url" },
values: new object[] { 56, null, "Polish Cookie Consent", "https://polishannoyancefilters.netlify.app/en/PolishCookieConsent/syntax/" });
migrationBuilder.InsertData(
table: "Dependents",
columns: new[] { "DependencyFilterListId", "DependentFilterListId" },
values: new object[] { 224, 2564 });
migrationBuilder.InsertData(
table: "FilterListLanguages",
columns: new[] { "FilterListId", "Iso6391" },
values: new object[] { 2564, "pl" });
migrationBuilder.InsertData(
table: "FilterListMaintainers",
columns: new[] { "FilterListId", "MaintainerId" },
values: new object[,]
{
{ 2564, 34 },
{ 2565, 34 }
});
migrationBuilder.InsertData(
table: "FilterListSyntaxes",
columns: new[] { "FilterListId", "SyntaxId" },
values: new object[,]
{
{ 2564, 56 },
{ 2565, 56 }
});
migrationBuilder.InsertData(
table: "FilterListTags",
columns: new[] { "FilterListId", "TagId" },
values: new object[,]
{
{ 2564, 8 },
{ 2565, 8 }
});
migrationBuilder.InsertData(
table: "FilterListViewUrls",
columns: new[] { "Id", "FilterListId", "Primariness", "Url" },
values: new object[,]
{
{ 2788, 2564, (short)1, "https://raw.githubusercontent.com/FiltersHeroes/PCCassets/main/plCDB.txt" },
{ 2789, 2564, (short)2, "https://cdn.jsdelivr.net/gh/FiltersHeroes/PCCassets@main/plCDB.txt" },
{ 2790, 2564, (short)3, "https://combinatronics.io/FiltersHeroes/PCCassets/main/plCDB.txt" },
{ 2791, 2564, (short)4, "https://cdn.statically.io/gh/FiltersHeroes/PCCassets/main/plCDB.txt" },
{ 2792, 2564, (short)5, "https://filtersheroes.gitlab.io/AssetsMirror/plCDB.txt" },
{ 2793, 2565, (short)1, "https://raw.githubusercontent.com/FiltersHeroes/PCCassets/main/euCDB.txt" },
{ 2794, 2565, (short)2, "https://cdn.jsdelivr.net/gh/FiltersHeroes/PCCassets@main/euCDB.txt" },
{ 2795, 2565, (short)3, "https://combinatronics.io/FiltersHeroes/PCCassets/main/euCDB.txt" },
{ 2796, 2565, (short)4, "https://cdn.statically.io/gh/FiltersHeroes/PCCassets/main/euCDB.txt" },
{ 2797, 2565, (short)5, "https://filtersheroes.gitlab.io/AssetsMirror/euCDB.txt" }
});
migrationBuilder.InsertData(
table: "SoftwareSyntaxes",
columns: new[] { "SoftwareId", "SyntaxId" },
values: new object[] { 47, 56 });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Dependents",
keyColumns: new[] { "DependencyFilterListId", "DependentFilterListId" },
keyValues: new object[] { 224, 2564 });
migrationBuilder.DeleteData(
table: "FilterListLanguages",
keyColumns: new[] { "FilterListId", "Iso6391" },
keyValues: new object[] { 2564, "pl" });
migrationBuilder.DeleteData(
table: "FilterListMaintainers",
keyColumns: new[] { "FilterListId", "MaintainerId" },
keyValues: new object[] { 2564, 34 });
migrationBuilder.DeleteData(
table: "FilterListMaintainers",
keyColumns: new[] { "FilterListId", "MaintainerId" },
keyValues: new object[] { 2565, 34 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2564, 56 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2565, 56 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2564, 8 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2565, 8 });
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2788);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2789);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2790);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2791);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2792);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2793);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2794);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2795);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2796);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2797);
migrationBuilder.DeleteData(
table: "SoftwareSyntaxes",
keyColumns: new[] { "SoftwareId", "SyntaxId" },
keyValues: new object[] { 47, 56 });
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2564);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2565);
migrationBuilder.DeleteData(
table: "Software",
keyColumn: "Id",
keyValue: 47);
migrationBuilder.DeleteData(
table: "Syntaxes",
keyColumn: "Id",
keyValue: 56);
}
}
}

View file

@ -1,25 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
{
public partial class _2667 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.InsertData(
table: "FilterListSyntaxes",
columns: new[] { "FilterListId", "SyntaxId" },
values: new object[] { 2541, 2 });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2541, 2 });
}
}
}

View file

@ -1,29 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
{
public partial class _2671 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2556,
column: "Description",
value: "Want to use ClearURLs without installing another extension? This list is a (unofficial) version of the ClearURLs rules, designed for use in uBlock Origin and AdGuard");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2556,
column: "Description",
value: "This list target international websites that clutter Mastodon public timelines and userfeeds with misinformation, unfounded articles, and/or contempt for humanity.");
}
}
}

View file

@ -7,33 +7,40 @@
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
{
[DbContext(typeof(QueryDbContext))]
[Migration("20210509225111_Initial")]
[Migration("20211116221734_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Relational:MaxIdentifierLength", 63)
.HasAnnotation("ProductVersion", "5.0.5")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
.HasAnnotation("ProductVersion", "6.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Dependent", b =>
{
b.Property<int>("DependencyFilterListId")
.HasColumnType("integer");
.HasColumnType("integer")
.HasColumnName("dependency_filter_list_id");
b.Property<int>("DependentFilterListId")
.HasColumnType("integer");
.HasColumnType("integer")
.HasColumnName("dependent_filter_list_id");
b.HasKey("DependencyFilterListId", "DependentFilterListId");
b.HasKey("DependencyFilterListId", "DependentFilterListId")
.HasName("pk_dependents");
b.HasIndex("DependentFilterListId");
b.HasIndex("DependentFilterListId")
.HasDatabaseName("ix_dependents_dependent_filter_list_id");
b.ToTable("Dependents");
b.ToTable("Dependents", (string)null);
});
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", b =>
@ -41,110 +48,142 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
.HasColumnName("id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("ChatUrl")
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("chat_url");
b.Property<string>("Description")
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("description");
b.Property<string>("DonateUrl")
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("donate_url");
b.Property<string>("EmailAddress")
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("email_address");
b.Property<string>("ForumUrl")
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("forum_url");
b.Property<string>("HomeUrl")
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("home_url");
b.Property<string>("IssuesUrl")
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("issues_url");
b.Property<int?>("LicenseId")
.HasColumnType("integer");
.HasColumnType("integer")
.HasColumnName("license_id");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("name");
b.Property<string>("OnionUrl")
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("onion_url");
b.Property<string>("PolicyUrl")
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("policy_url");
b.Property<string>("SubmissionUrl")
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("submission_url");
b.HasKey("Id");
b.HasKey("Id")
.HasName("pk_filter_lists");
b.HasIndex("LicenseId");
b.HasIndex("LicenseId")
.HasDatabaseName("ix_filter_lists_license_id");
b.ToTable("FilterLists");
b.ToTable("filter_lists", (string)null);
});
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListLanguage", b =>
{
b.Property<int>("FilterListId")
.HasColumnType("integer");
.HasColumnType("integer")
.HasColumnName("filter_list_id");
b.Property<string>("Iso6391")
.HasColumnType("character(2)");
.HasColumnType("character(2)")
.HasColumnName("iso6391");
b.HasKey("FilterListId", "Iso6391");
b.HasKey("FilterListId", "Iso6391")
.HasName("pk_filter_list_languages");
b.HasIndex("Iso6391");
b.HasIndex("Iso6391")
.HasDatabaseName("ix_filter_list_languages_iso6391");
b.ToTable("FilterListLanguages");
b.ToTable("FilterListLanguages", (string)null);
});
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListMaintainer", b =>
{
b.Property<int>("FilterListId")
.HasColumnType("integer");
.HasColumnType("integer")
.HasColumnName("filter_list_id");
b.Property<int>("MaintainerId")
.HasColumnType("integer");
.HasColumnType("integer")
.HasColumnName("maintainer_id");
b.HasKey("FilterListId", "MaintainerId");
b.HasKey("FilterListId", "MaintainerId")
.HasName("pk_filter_list_maintainers");
b.HasIndex("MaintainerId");
b.HasIndex("MaintainerId")
.HasDatabaseName("ix_filter_list_maintainers_maintainer_id");
b.ToTable("FilterListMaintainers");
b.ToTable("FilterListMaintainers", (string)null);
});
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListSyntax", b =>
{
b.Property<int>("FilterListId")
.HasColumnType("integer");
.HasColumnType("integer")
.HasColumnName("filter_list_id");
b.Property<int>("SyntaxId")
.HasColumnType("integer");
.HasColumnType("integer")
.HasColumnName("syntax_id");
b.HasKey("FilterListId", "SyntaxId");
b.HasKey("FilterListId", "SyntaxId")
.HasName("pk_filter_list_syntaxes");
b.HasIndex("SyntaxId");
b.HasIndex("SyntaxId")
.HasDatabaseName("ix_filter_list_syntaxes_syntax_id");
b.ToTable("FilterListSyntaxes");
b.ToTable("FilterListSyntaxes", (string)null);
});
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListTag", b =>
{
b.Property<int>("FilterListId")
.HasColumnType("integer");
.HasColumnType("integer")
.HasColumnName("filter_list_id");
b.Property<int>("TagId")
.HasColumnType("integer");
.HasColumnType("integer")
.HasColumnName("tag_id");
b.HasKey("FilterListId", "TagId");
b.HasKey("FilterListId", "TagId")
.HasName("pk_filter_list_tags");
b.HasIndex("TagId");
b.HasIndex("TagId")
.HasDatabaseName("ix_filter_list_tags_tag_id");
b.ToTable("FilterListTags");
b.ToTable("FilterListTags", (string)null);
});
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListViewUrl", b =>
@ -152,46 +191,58 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
.HasColumnName("id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("FilterListId")
.HasColumnType("integer");
.HasColumnType("integer")
.HasColumnName("filter_list_id");
b.Property<short>("Primariness")
.ValueGeneratedOnAdd()
.HasColumnType("smallint")
.HasDefaultValue((short)1);
.HasDefaultValue((short)1)
.HasColumnName("primariness");
b.Property<short>("SegmentNumber")
.ValueGeneratedOnAdd()
.HasColumnType("smallint")
.HasDefaultValue((short)1);
.HasDefaultValue((short)1)
.HasColumnName("segment_number");
b.Property<string>("Url")
.IsRequired()
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("url");
b.HasKey("Id");
b.HasKey("Id")
.HasName("pk_filter_list_view_urls");
b.HasIndex("FilterListId", "SegmentNumber", "Primariness")
.IsUnique();
.IsUnique()
.HasDatabaseName("ix_filter_list_view_urls_filter_list_id_segment_number_primariness");
b.ToTable("FilterListViewUrls");
b.ToTable("FilterListViewUrls", (string)null);
});
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Fork", b =>
{
b.Property<int>("UpstreamFilterListId")
.HasColumnType("integer");
.HasColumnType("integer")
.HasColumnName("upstream_filter_list_id");
b.Property<int>("ForkFilterListId")
.HasColumnType("integer");
.HasColumnType("integer")
.HasColumnName("fork_filter_list_id");
b.HasKey("UpstreamFilterListId", "ForkFilterListId");
b.HasKey("UpstreamFilterListId", "ForkFilterListId")
.HasName("pk_forks");
b.HasIndex("ForkFilterListId");
b.HasIndex("ForkFilterListId")
.HasDatabaseName("ix_forks_fork_filter_list_id");
b.ToTable("Forks");
b.ToTable("Forks", (string)null);
});
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Language", b =>
@ -199,15 +250,18 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
b.Property<string>("Iso6391")
.HasMaxLength(2)
.HasColumnType("character(2)")
.IsFixedLength(true);
.HasColumnName("iso6391")
.IsFixedLength();
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("name");
b.HasKey("Iso6391");
b.HasKey("Iso6391")
.HasName("pk_languages");
b.ToTable("Languages");
b.ToTable("languages", (string)null);
});
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.License", b =>
@ -215,27 +269,35 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
.HasColumnName("id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("name");
b.Property<bool>("PermitsCommercialUse")
.HasColumnType("boolean");
.HasColumnType("boolean")
.HasColumnName("permits_commercial_use");
b.Property<bool>("PermitsDistribution")
.HasColumnType("boolean");
.HasColumnType("boolean")
.HasColumnName("permits_distribution");
b.Property<bool>("PermitsModification")
.HasColumnType("boolean");
.HasColumnType("boolean")
.HasColumnName("permits_modification");
b.Property<string>("Url")
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("url");
b.HasKey("Id");
b.HasKey("Id")
.HasName("pk_licenses");
b.ToTable("Licenses");
b.ToTable("licenses", (string)null);
});
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Maintainer", b =>
@ -243,39 +305,50 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
.HasColumnName("id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("EmailAddress")
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("email_address");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("name");
b.Property<string>("TwitterHandle")
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("twitter_handle");
b.Property<string>("Url")
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("url");
b.HasKey("Id");
b.HasKey("Id")
.HasName("pk_maintainers");
b.ToTable("Maintainers");
b.ToTable("maintainers", (string)null);
});
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Merge", b =>
{
b.Property<int>("IncludedInFilterListId")
.HasColumnType("integer");
.HasColumnType("integer")
.HasColumnName("included_in_filter_list_id");
b.Property<int>("IncludesFilterListId")
.HasColumnType("integer");
.HasColumnType("integer")
.HasColumnName("includes_filter_list_id");
b.HasKey("IncludedInFilterListId", "IncludesFilterListId");
b.HasKey("IncludedInFilterListId", "IncludesFilterListId")
.HasName("pk_merges");
b.HasIndex("IncludesFilterListId");
b.HasIndex("IncludesFilterListId")
.HasDatabaseName("ix_merges_includes_filter_list_id");
b.ToTable("Merges");
b.ToTable("Merges", (string)null);
});
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Software", b =>
@ -283,42 +356,54 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
.HasColumnName("id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Description")
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("description");
b.Property<string>("DownloadUrl")
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("download_url");
b.Property<string>("HomeUrl")
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("home_url");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("name");
b.Property<bool>("SupportsAbpUrlScheme")
.HasColumnType("boolean");
.HasColumnType("boolean")
.HasColumnName("supports_abp_url_scheme");
b.HasKey("Id");
b.HasKey("Id")
.HasName("pk_software");
b.ToTable("Software");
b.ToTable("software", (string)null);
});
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.SoftwareSyntax", b =>
{
b.Property<int>("SoftwareId")
.HasColumnType("integer");
.HasColumnType("integer")
.HasColumnName("software_id");
b.Property<int>("SyntaxId")
.HasColumnType("integer");
.HasColumnType("integer")
.HasColumnName("syntax_id");
b.HasKey("SoftwareId", "SyntaxId");
b.HasKey("SoftwareId", "SyntaxId")
.HasName("pk_software_syntaxes");
b.HasIndex("SyntaxId");
b.HasIndex("SyntaxId")
.HasDatabaseName("ix_software_syntaxes_syntax_id");
b.ToTable("SoftwareSyntaxes");
b.ToTable("SoftwareSyntaxes", (string)null);
});
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Syntax", b =>
@ -326,21 +411,27 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
.HasColumnName("id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Description")
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("description");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("name");
b.Property<string>("Url")
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("url");
b.HasKey("Id");
b.HasKey("Id")
.HasName("pk_syntaxes");
b.ToTable("Syntaxes");
b.ToTable("syntaxes", (string)null);
});
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Tag", b =>
@ -348,18 +439,23 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
.HasColumnName("id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Description")
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("description");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
.HasColumnType("text")
.HasColumnName("name");
b.HasKey("Id");
b.HasKey("Id")
.HasName("pk_tags");
b.ToTable("Tags");
b.ToTable("tags", (string)null);
});
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Dependent", b =>
@ -368,13 +464,15 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
.WithMany("DependentFilterLists")
.HasForeignKey("DependencyFilterListId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
.IsRequired()
.HasConstraintName("fk_dependents_filter_lists_filter_list_id1");
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "DependentFilterList")
.WithMany("DependencyFilterLists")
.HasForeignKey("DependentFilterListId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
.IsRequired()
.HasConstraintName("fk_dependents_filter_lists_filter_list_id");
b.Navigation("DependencyFilterList");
@ -383,98 +481,88 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", b =>
{
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.License", "License")
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.License", null)
.WithMany("FilterLists")
.HasForeignKey("LicenseId");
b.Navigation("License");
.HasForeignKey("LicenseId")
.HasConstraintName("fk_filter_lists_licenses_license_id");
});
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListLanguage", b =>
{
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "FilterList")
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", null)
.WithMany("FilterListLanguages")
.HasForeignKey("FilterListId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
.IsRequired()
.HasConstraintName("fk_filter_list_languages_filter_lists_filter_list_id");
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Language", "Language")
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Language", null)
.WithMany("FilterListLanguages")
.HasForeignKey("Iso6391")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("FilterList");
b.Navigation("Language");
.IsRequired()
.HasConstraintName("fk_filter_list_languages_languages_language_temp_id");
});
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListMaintainer", b =>
{
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "FilterList")
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", null)
.WithMany("FilterListMaintainers")
.HasForeignKey("FilterListId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
.IsRequired()
.HasConstraintName("fk_filter_list_maintainers_filter_lists_filter_list_id");
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Maintainer", "Maintainer")
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Maintainer", null)
.WithMany("FilterListMaintainers")
.HasForeignKey("MaintainerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("FilterList");
b.Navigation("Maintainer");
.IsRequired()
.HasConstraintName("fk_filter_list_maintainers_maintainers_maintainer_id");
});
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListSyntax", b =>
{
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "FilterList")
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", null)
.WithMany("FilterListSyntaxes")
.HasForeignKey("FilterListId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
.IsRequired()
.HasConstraintName("fk_filter_list_syntaxes_filter_lists_filter_list_id");
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Syntax", "Syntax")
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Syntax", null)
.WithMany("FilterListSyntaxes")
.HasForeignKey("SyntaxId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("FilterList");
b.Navigation("Syntax");
.IsRequired()
.HasConstraintName("fk_filter_list_syntaxes_syntaxes_syntax_id");
});
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListTag", b =>
{
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "FilterList")
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", null)
.WithMany("FilterListTags")
.HasForeignKey("FilterListId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
.IsRequired()
.HasConstraintName("fk_filter_list_tags_filter_lists_filter_list_id");
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Tag", "Tag")
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Tag", null)
.WithMany("FilterListTags")
.HasForeignKey("TagId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("FilterList");
b.Navigation("Tag");
.IsRequired()
.HasConstraintName("fk_filter_list_tags_tags_tag_id");
});
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterListViewUrl", b =>
{
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "FilterList")
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", null)
.WithMany("ViewUrls")
.HasForeignKey("FilterListId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("FilterList");
.IsRequired()
.HasConstraintName("fk_filter_list_view_urls_filter_lists_filter_list_id");
});
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Fork", b =>
@ -483,13 +571,15 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
.WithMany("UpstreamFilterLists")
.HasForeignKey("ForkFilterListId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
.IsRequired()
.HasConstraintName("fk_forks_filter_lists_filter_list_id1");
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "UpstreamFilterList")
.WithMany("ForkFilterLists")
.HasForeignKey("UpstreamFilterListId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
.IsRequired()
.HasConstraintName("fk_forks_filter_lists_filter_list_id");
b.Navigation("ForkFilterList");
@ -502,13 +592,15 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
.WithMany("IncludesFilterLists")
.HasForeignKey("IncludedInFilterListId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
.IsRequired()
.HasConstraintName("fk_merges_filter_lists_filter_list_id1");
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "IncludesFilterList")
.WithMany("IncludedInFilterLists")
.HasForeignKey("IncludesFilterListId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
.IsRequired()
.HasConstraintName("fk_merges_filter_lists_filter_list_id");
b.Navigation("IncludedInFilterList");
@ -517,21 +609,19 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.SoftwareSyntax", b =>
{
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Software", "Software")
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Software", null)
.WithMany("SoftwareSyntaxes")
.HasForeignKey("SoftwareId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
.IsRequired()
.HasConstraintName("fk_software_syntaxes_software_software_id");
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Syntax", "Syntax")
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Syntax", null)
.WithMany("SoftwareSyntaxes")
.HasForeignKey("SyntaxId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Software");
b.Navigation("Syntax");
.IsRequired()
.HasConstraintName("fk_software_syntaxes_syntaxes_syntax_id");
});
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", b =>

View file

@ -0,0 +1,449 @@
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
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>(type: "character(2)", fixedLength: true, maxLength: 2, nullable: false),
name = table.Column<string>(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_languages", x => x.iso6391);
});
migrationBuilder.CreateTable(
name: "licenses",
columns: table => new
{
id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
name = table.Column<string>(type: "text", nullable: false),
url = table.Column<string>(type: "text", nullable: true),
permits_modification = table.Column<bool>(type: "boolean", nullable: false),
permits_distribution = table.Column<bool>(type: "boolean", nullable: false),
permits_commercial_use = table.Column<bool>(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_licenses", x => x.id);
});
migrationBuilder.CreateTable(
name: "maintainers",
columns: table => new
{
id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
name = table.Column<string>(type: "text", nullable: false),
url = table.Column<string>(type: "text", nullable: true),
email_address = table.Column<string>(type: "text", nullable: true),
twitter_handle = table.Column<string>(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("pk_maintainers", x => x.id);
});
migrationBuilder.CreateTable(
name: "software",
columns: table => new
{
id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
name = table.Column<string>(type: "text", nullable: false),
description = table.Column<string>(type: "text", nullable: true),
home_url = table.Column<string>(type: "text", nullable: true),
download_url = table.Column<string>(type: "text", nullable: true),
supports_abp_url_scheme = table.Column<bool>(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_software", x => x.id);
});
migrationBuilder.CreateTable(
name: "syntaxes",
columns: table => new
{
id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
name = table.Column<string>(type: "text", nullable: false),
description = table.Column<string>(type: "text", nullable: true),
url = table.Column<string>(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("pk_syntaxes", x => x.id);
});
migrationBuilder.CreateTable(
name: "tags",
columns: table => new
{
id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
name = table.Column<string>(type: "text", nullable: false),
description = table.Column<string>(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("pk_tags", x => x.id);
});
migrationBuilder.CreateTable(
name: "filter_lists",
columns: table => new
{
id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
name = table.Column<string>(type: "text", nullable: false),
description = table.Column<string>(type: "text", nullable: true),
license_id = table.Column<int>(type: "integer", nullable: true),
home_url = table.Column<string>(type: "text", nullable: true),
onion_url = table.Column<string>(type: "text", nullable: true),
policy_url = table.Column<string>(type: "text", nullable: true),
submission_url = table.Column<string>(type: "text", nullable: true),
issues_url = table.Column<string>(type: "text", nullable: true),
forum_url = table.Column<string>(type: "text", nullable: true),
chat_url = table.Column<string>(type: "text", nullable: true),
email_address = table.Column<string>(type: "text", nullable: true),
donate_url = table.Column<string>(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("pk_filter_lists", x => x.id);
table.ForeignKey(
name: "fk_filter_lists_licenses_license_id",
column: x => x.license_id,
principalTable: "licenses",
principalColumn: "id");
});
migrationBuilder.CreateTable(
name: "SoftwareSyntaxes",
columns: table => new
{
software_id = table.Column<int>(type: "integer", nullable: false),
syntax_id = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_software_syntaxes", x => new { x.software_id, x.syntax_id });
table.ForeignKey(
name: "fk_software_syntaxes_software_software_id",
column: x => x.software_id,
principalTable: "software",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "fk_software_syntaxes_syntaxes_syntax_id",
column: x => x.syntax_id,
principalTable: "syntaxes",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Dependents",
columns: table => new
{
dependency_filter_list_id = table.Column<int>(type: "integer", nullable: false),
dependent_filter_list_id = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_dependents", x => new { x.dependency_filter_list_id, x.dependent_filter_list_id });
table.ForeignKey(
name: "fk_dependents_filter_lists_filter_list_id",
column: x => x.dependent_filter_list_id,
principalTable: "filter_lists",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "fk_dependents_filter_lists_filter_list_id1",
column: x => x.dependency_filter_list_id,
principalTable: "filter_lists",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "FilterListLanguages",
columns: table => new
{
filter_list_id = table.Column<int>(type: "integer", nullable: false),
iso6391 = table.Column<string>(type: "character(2)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_filter_list_languages", x => new { x.filter_list_id, x.iso6391 });
table.ForeignKey(
name: "fk_filter_list_languages_filter_lists_filter_list_id",
column: x => x.filter_list_id,
principalTable: "filter_lists",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "fk_filter_list_languages_languages_language_temp_id",
column: x => x.iso6391,
principalTable: "languages",
principalColumn: "iso6391",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "FilterListMaintainers",
columns: table => new
{
filter_list_id = table.Column<int>(type: "integer", nullable: false),
maintainer_id = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_filter_list_maintainers", x => new { x.filter_list_id, x.maintainer_id });
table.ForeignKey(
name: "fk_filter_list_maintainers_filter_lists_filter_list_id",
column: x => x.filter_list_id,
principalTable: "filter_lists",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "fk_filter_list_maintainers_maintainers_maintainer_id",
column: x => x.maintainer_id,
principalTable: "maintainers",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "FilterListSyntaxes",
columns: table => new
{
filter_list_id = table.Column<int>(type: "integer", nullable: false),
syntax_id = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_filter_list_syntaxes", x => new { x.filter_list_id, x.syntax_id });
table.ForeignKey(
name: "fk_filter_list_syntaxes_filter_lists_filter_list_id",
column: x => x.filter_list_id,
principalTable: "filter_lists",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "fk_filter_list_syntaxes_syntaxes_syntax_id",
column: x => x.syntax_id,
principalTable: "syntaxes",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "FilterListTags",
columns: table => new
{
filter_list_id = table.Column<int>(type: "integer", nullable: false),
tag_id = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_filter_list_tags", x => new { x.filter_list_id, x.tag_id });
table.ForeignKey(
name: "fk_filter_list_tags_filter_lists_filter_list_id",
column: x => x.filter_list_id,
principalTable: "filter_lists",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "fk_filter_list_tags_tags_tag_id",
column: x => x.tag_id,
principalTable: "tags",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "FilterListViewUrls",
columns: table => new
{
id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
filter_list_id = table.Column<int>(type: "integer", nullable: false),
segment_number = table.Column<short>(type: "smallint", nullable: false, defaultValue: (short)1),
primariness = table.Column<short>(type: "smallint", nullable: false, defaultValue: (short)1),
url = table.Column<string>(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_filter_list_view_urls", x => x.id);
table.ForeignKey(
name: "fk_filter_list_view_urls_filter_lists_filter_list_id",
column: x => x.filter_list_id,
principalTable: "filter_lists",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Forks",
columns: table => new
{
upstream_filter_list_id = table.Column<int>(type: "integer", nullable: false),
fork_filter_list_id = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_forks", x => new { x.upstream_filter_list_id, x.fork_filter_list_id });
table.ForeignKey(
name: "fk_forks_filter_lists_filter_list_id",
column: x => x.upstream_filter_list_id,
principalTable: "filter_lists",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "fk_forks_filter_lists_filter_list_id1",
column: x => x.fork_filter_list_id,
principalTable: "filter_lists",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Merges",
columns: table => new
{
included_in_filter_list_id = table.Column<int>(type: "integer", nullable: false),
includes_filter_list_id = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_merges", x => new { x.included_in_filter_list_id, x.includes_filter_list_id });
table.ForeignKey(
name: "fk_merges_filter_lists_filter_list_id",
column: x => x.includes_filter_list_id,
principalTable: "filter_lists",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "fk_merges_filter_lists_filter_list_id1",
column: x => x.included_in_filter_list_id,
principalTable: "filter_lists",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "ix_dependents_dependent_filter_list_id",
table: "Dependents",
column: "dependent_filter_list_id");
migrationBuilder.CreateIndex(
name: "ix_filter_list_languages_iso6391",
table: "FilterListLanguages",
column: "iso6391");
migrationBuilder.CreateIndex(
name: "ix_filter_list_maintainers_maintainer_id",
table: "FilterListMaintainers",
column: "maintainer_id");
migrationBuilder.CreateIndex(
name: "ix_filter_list_syntaxes_syntax_id",
table: "FilterListSyntaxes",
column: "syntax_id");
migrationBuilder.CreateIndex(
name: "ix_filter_list_tags_tag_id",
table: "FilterListTags",
column: "tag_id");
migrationBuilder.CreateIndex(
name: "ix_filter_list_view_urls_filter_list_id_segment_number_primariness",
table: "FilterListViewUrls",
columns: new[] { "filter_list_id", "segment_number", "primariness" },
unique: true);
migrationBuilder.CreateIndex(
name: "ix_forks_fork_filter_list_id",
table: "Forks",
column: "fork_filter_list_id");
migrationBuilder.CreateIndex(
name: "ix_merges_includes_filter_list_id",
table: "Merges",
column: "includes_filter_list_id");
migrationBuilder.CreateIndex(
name: "ix_software_syntaxes_syntax_id",
table: "SoftwareSyntaxes",
column: "syntax_id");
migrationBuilder.CreateIndex(
name: "ix_filter_lists_license_id",
table: "filter_lists",
column: "license_id");
}
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: "filter_lists");
migrationBuilder.DropTable(
name: "software");
migrationBuilder.DropTable(
name: "syntaxes");
migrationBuilder.DropTable(
name: "licenses");
}
}
}

View file

@ -25,6 +25,7 @@ public static void AddInfrastructure(this IServiceCollection services, IConfigur
{
o.UseNpgsql(configuration.GetConnectionString("DirectoryConnection"),
po => po.MigrationsAssembly("FilterLists.Directory.Infrastructure.Migrations"))
.UseSnakeCaseNamingConvention()
#if DEBUG
.LogTo(Console.WriteLine, LogLevel.Information);
o.EnableSensitiveDataLogging();

View file

@ -17,6 +17,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EFCore.NamingConventions" Version="6.0.0-rc.1" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.0" />
</ItemGroup>