feat(data): migrate PR #2730

This commit is contained in:
Azure Pipelines EF Migration Bot 2021-12-19 06:55:07 +00:00 committed by Collin M. Barrett
parent 3da5b14f1c
commit 7e887dc47c
3 changed files with 87934 additions and 152 deletions

View file

@ -0,0 +1,261 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
{
public partial class _2730 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "filter_list_languages",
keyColumns: new[] { "filter_list_id", "language_id" },
keyValues: new object[] { 2080L, 37L });
migrationBuilder.DeleteData(
table: "filter_list_languages",
keyColumns: new[] { "filter_list_id", "language_id" },
keyValues: new object[] { 2083L, 73L });
migrationBuilder.DeleteData(
table: "filter_list_languages",
keyColumns: new[] { "filter_list_id", "language_id" },
keyValues: new object[] { 2086L, 37L });
migrationBuilder.DeleteData(
table: "filter_list_languages",
keyColumns: new[] { "filter_list_id", "language_id" },
keyValues: new object[] { 2090L, 37L });
migrationBuilder.DeleteData(
table: "filter_list_maintainers",
keyColumns: new[] { "filter_list_id", "maintainer_id" },
keyValues: new object[] { 2080L, 150L });
migrationBuilder.DeleteData(
table: "filter_list_maintainers",
keyColumns: new[] { "filter_list_id", "maintainer_id" },
keyValues: new object[] { 2083L, 150L });
migrationBuilder.DeleteData(
table: "filter_list_maintainers",
keyColumns: new[] { "filter_list_id", "maintainer_id" },
keyValues: new object[] { 2086L, 150L });
migrationBuilder.DeleteData(
table: "filter_list_maintainers",
keyColumns: new[] { "filter_list_id", "maintainer_id" },
keyValues: new object[] { 2090L, 150L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2080L, 3L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2083L, 3L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2086L, 4L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2090L, 4L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2080L, 3L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2083L, 15L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2086L, 15L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2090L, 31L });
migrationBuilder.DeleteData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2080L, 2187L });
migrationBuilder.DeleteData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2083L, 2190L });
migrationBuilder.DeleteData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2086L, 2193L });
migrationBuilder.DeleteData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2090L, 2197L });
migrationBuilder.DeleteData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2080L);
migrationBuilder.DeleteData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2083L);
migrationBuilder.DeleteData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2086L);
migrationBuilder.DeleteData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2090L);
migrationBuilder.InsertData(
table: "filter_lists",
columns: new[] { "id", "chat_url", "description", "donate_url", "email_address", "forum_url", "home_url", "is_approved", "issues_url", "license_id", "name", "onion_url", "policy_url", "submission_url" },
values: new object[] { 2095L, null, "Enhance anti-scam capability of 280blocker adblock filter by utilizing advanced capability of AdGuard/uBlock Origin.", null, null, null, "https://github.com/Yuki2718/adblock", true, "https://github.com/Yuki2718/adblock/issues", 28L, "Anti-scam enhancer for 280blocker adblock filter", null, null, null });
migrationBuilder.InsertData(
table: "filter_list_languages",
columns: new[] { "filter_list_id", "language_id" },
values: new object[] { 2095L, 73L });
migrationBuilder.InsertData(
table: "filter_list_maintainers",
columns: new[] { "filter_list_id", "maintainer_id" },
values: new object[] { 2095L, 150L });
migrationBuilder.InsertData(
table: "filter_list_syntaxes",
columns: new[] { "filter_list_id", "syntax_id" },
values: new object[] { 2095L, 6L });
migrationBuilder.InsertData(
table: "filter_list_tags",
columns: new[] { "filter_list_id", "tag_id" },
values: new object[] { 2095L, 6L });
migrationBuilder.InsertData(
table: "filter_list_view_urls",
columns: new[] { "filter_list_id", "id", "primariness", "url" },
values: new object[] { 2095L, 2202L, (short)1, "https://raw.githubusercontent.com/Yuki2718/adblock/master/japanese/280-patch.txt" });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "filter_list_languages",
keyColumns: new[] { "filter_list_id", "language_id" },
keyValues: new object[] { 2095L, 73L });
migrationBuilder.DeleteData(
table: "filter_list_maintainers",
keyColumns: new[] { "filter_list_id", "maintainer_id" },
keyValues: new object[] { 2095L, 150L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2095L, 6L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2095L, 6L });
migrationBuilder.DeleteData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2095L, 2202L });
migrationBuilder.DeleteData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2095L);
migrationBuilder.InsertData(
table: "filter_lists",
columns: new[] { "id", "chat_url", "description", "donate_url", "email_address", "forum_url", "home_url", "is_approved", "issues_url", "license_id", "name", "onion_url", "policy_url", "submission_url" },
values: new object[,]
{
{ 2080L, null, "AdGuard Tracking Protection filter is probably the least false-positive prone anti-tracking list; however, it comes with its own cost of less coverage which this filter aims to complement.", null, null, null, "https://github.com/Yuki2718/adblock", true, "https://github.com/Yuki2718/adblock/issues", 8L, "AdGuard Tracking Protection Plus", null, null, null },
{ 2083L, null, "Removes ranking buttons on adult sites.", null, null, null, "https://github.com/Yuki2718/adblock", true, "https://github.com/Yuki2718/adblock/issues", 8L, "Yuki's Blog Parts Adult", null, null, null },
{ 2086L, null, "WordPress plugins have been security nightmare and are usually implemented in first-party resource that bypasses medium mode. Although it's impossible to block thousands of these plugins without breaking too many sites, blocking those unwanted plugins won't be a bad idea. While popular social and annoyances filters block many of them, they come with tons of unnecessary rules[^1] and also occasionally cause false-positive. For these reasons I've settled down to AdGuard Social media filter which is relatively small in size and rarely breaks pages; however, it only blocks minimal set of the plugins. This list includes 1) rules for the plugins not on the Social media filter or other default filter lists, 2) rules almost equivalent to Noscript's Application Boundaries Enforcer, and 3) a regex rule focused only on the latest survey scam campaign.", null, null, null, "https://github.com/Yuki2718/adblock", true, "https://github.com/Yuki2718/adblock/issues", 8L, "Yuki's uBlock Static Rules", null, null, null },
{ 2090L, null, "It's a mobile version of Placeholder Hider with no generic hiding.", null, null, null, "https://github.com/Yuki2718/adblock", true, "https://github.com/Yuki2718/adblock/issues", 8L, "Placeholder Hider with no generic hiding for mobile", null, null, null }
});
migrationBuilder.InsertData(
table: "filter_list_languages",
columns: new[] { "filter_list_id", "language_id" },
values: new object[,]
{
{ 2080L, 37L },
{ 2083L, 73L },
{ 2086L, 37L },
{ 2090L, 37L }
});
migrationBuilder.InsertData(
table: "filter_list_maintainers",
columns: new[] { "filter_list_id", "maintainer_id" },
values: new object[,]
{
{ 2080L, 150L },
{ 2083L, 150L },
{ 2086L, 150L },
{ 2090L, 150L }
});
migrationBuilder.InsertData(
table: "filter_list_syntaxes",
columns: new[] { "filter_list_id", "syntax_id" },
values: new object[,]
{
{ 2080L, 3L },
{ 2083L, 3L },
{ 2086L, 4L },
{ 2090L, 4L }
});
migrationBuilder.InsertData(
table: "filter_list_tags",
columns: new[] { "filter_list_id", "tag_id" },
values: new object[,]
{
{ 2080L, 3L },
{ 2083L, 15L },
{ 2086L, 15L },
{ 2090L, 31L }
});
migrationBuilder.InsertData(
table: "filter_list_view_urls",
columns: new[] { "filter_list_id", "id", "primariness", "segment_number", "url" },
values: new object[,]
{
{ 2080L, 2187L, (short)1, (short)0, "https://raw.githubusercontent.com/Yuki2718/adblock/master/adguard/tracking-plus.txt" },
{ 2083L, 2190L, (short)1, (short)0, "https://raw.githubusercontent.com/Yuki2718/adblock/master/japanese/blog-parts-adult.txt" },
{ 2086L, 2193L, (short)1, (short)0, "https://raw.githubusercontent.com/Yuki2718/adblock/master/medium_mode/static-rules.txt" },
{ 2090L, 2197L, (short)1, (short)0, "https://raw.githubusercontent.com/Yuki2718/adblock/master/no_gen_cosm/phhider-mob.txt" }
});
}
}
}

View file

@ -17145,16 +17145,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
Name = "AdGuard Social Media Plus"
},
new
{
Id = 2080L,
Description = "AdGuard Tracking Protection filter is probably the least false-positive prone anti-tracking list; however, it comes with its own cost of less coverage which this filter aims to complement.",
HomeUrl = "https://github.com/Yuki2718/adblock",
IsApproved = true,
IssuesUrl = "https://github.com/Yuki2718/adblock/issues",
LicenseId = 8L,
Name = "AdGuard Tracking Protection Plus"
},
new
{
Id = 2081L,
Description = "Inspired by Sable Filter at MeetingLabs, this removes cookie consents. Main focuses are Japanese sites and other high-traffic sites many Japanese people will visit. False-positive prone rules won't be added (e.g. cookielaw.org, uk-cookie-consent plugin).",
@ -17175,16 +17165,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
Name = "Yuki's Blog Parts"
},
new
{
Id = 2083L,
Description = "Removes ranking buttons on adult sites.",
HomeUrl = "https://github.com/Yuki2718/adblock",
IsApproved = true,
IssuesUrl = "https://github.com/Yuki2718/adblock/issues",
LicenseId = 8L,
Name = "Yuki's Blog Parts Adult"
},
new
{
Id = 2084L,
Description = "This is to counter unnecessary or too generic allowlists which were not addressed or won't be addressed by the maintainer. Only for advanced user as it can cause problems.",
@ -17205,16 +17185,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
Name = "Yuki's uBlock Dynamic Rules"
},
new
{
Id = 2086L,
Description = "WordPress plugins have been security nightmare and are usually implemented in first-party resource that bypasses medium mode. Although it's impossible to block thousands of these plugins without breaking too many sites, blocking those unwanted plugins won't be a bad idea. While popular social and annoyances filters block many of them, they come with tons of unnecessary rules[^1] and also occasionally cause false-positive. For these reasons I've settled down to AdGuard Social media filter which is relatively small in size and rarely breaks pages; however, it only blocks minimal set of the plugins. This list includes 1) rules for the plugins not on the Social media filter or other default filter lists, 2) rules almost equivalent to Noscript's Application Boundaries Enforcer, and 3) a regex rule focused only on the latest survey scam campaign.",
HomeUrl = "https://github.com/Yuki2718/adblock",
IsApproved = true,
IssuesUrl = "https://github.com/Yuki2718/adblock/issues",
LicenseId = 8L,
Name = "Yuki's uBlock Static Rules"
},
new
{
Id = 2087L,
Description = "Blocklist based on articles published by security research groups.",
@ -17245,16 +17215,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
Name = "Placeholder Hider with no generic hiding"
},
new
{
Id = 2090L,
Description = "It's a mobile version of Placeholder Hider with no generic hiding.",
HomeUrl = "https://github.com/Yuki2718/adblock",
IsApproved = true,
IssuesUrl = "https://github.com/Yuki2718/adblock/issues",
LicenseId = 8L,
Name = "Placeholder Hider with no generic hiding for mobile"
},
new
{
Id = 2091L,
Description = "The most comprehensive, block-first, and efficient Japanese list for uBlock Origin that removes ads and analytics on desktop, designed for advanced user.",
@ -17295,6 +17255,16 @@ protected override void BuildModel(ModelBuilder modelBuilder)
Name = "Yuki's uBlock Japanese filters - Annoyances"
},
new
{
Id = 2095L,
Description = "Enhance anti-scam capability of 280blocker adblock filter by utilizing advanced capability of AdGuard/uBlock Origin.",
HomeUrl = "https://github.com/Yuki2718/adblock",
IsApproved = true,
IssuesUrl = "https://github.com/Yuki2718/adblock/issues",
LicenseId = 28L,
Name = "Anti-scam enhancer for 280blocker adblock filter"
},
new
{
Id = 2096L,
Description = "Removes blogroll (feed-style mutual links) on Japanese sites. Included in Yuki's uBlock Japanese filters - Annoyances",
@ -25397,11 +25367,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
LanguageId = 37L
},
new
{
FilterListId = 2080L,
LanguageId = 37L
},
new
{
FilterListId = 2081L,
LanguageId = 73L
@ -25412,11 +25377,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
LanguageId = 73L
},
new
{
FilterListId = 2083L,
LanguageId = 73L
},
new
{
FilterListId = 2084L,
LanguageId = 37L
@ -25427,11 +25387,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
LanguageId = 37L
},
new
{
FilterListId = 2086L,
LanguageId = 37L
},
new
{
FilterListId = 2088L,
LanguageId = 37L
@ -25442,11 +25397,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
LanguageId = 37L
},
new
{
FilterListId = 2090L,
LanguageId = 37L
},
new
{
FilterListId = 2091L,
LanguageId = 73L
@ -25467,6 +25417,11 @@ protected override void BuildModel(ModelBuilder modelBuilder)
LanguageId = 73L
},
new
{
FilterListId = 2095L,
LanguageId = 73L
},
new
{
FilterListId = 2096L,
LanguageId = 73L
@ -32563,11 +32518,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
MaintainerId = 150L
},
new
{
FilterListId = 2080L,
MaintainerId = 150L
},
new
{
FilterListId = 2081L,
MaintainerId = 150L
@ -32578,11 +32528,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
MaintainerId = 150L
},
new
{
FilterListId = 2083L,
MaintainerId = 150L
},
new
{
FilterListId = 2084L,
MaintainerId = 150L
@ -32593,11 +32538,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
MaintainerId = 150L
},
new
{
FilterListId = 2086L,
MaintainerId = 150L
},
new
{
FilterListId = 2088L,
MaintainerId = 150L
@ -32608,11 +32548,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
MaintainerId = 150L
},
new
{
FilterListId = 2090L,
MaintainerId = 150L
},
new
{
FilterListId = 2091L,
MaintainerId = 150L
@ -32633,6 +32568,11 @@ protected override void BuildModel(ModelBuilder modelBuilder)
MaintainerId = 150L
},
new
{
FilterListId = 2095L,
MaintainerId = 150L
},
new
{
FilterListId = 2096L,
MaintainerId = 150L
@ -42249,11 +42189,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
SyntaxId = 3L
},
new
{
FilterListId = 2080L,
SyntaxId = 3L
},
new
{
FilterListId = 2081L,
SyntaxId = 6L
@ -42264,11 +42199,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
SyntaxId = 3L
},
new
{
FilterListId = 2083L,
SyntaxId = 3L
},
new
{
FilterListId = 2084L,
SyntaxId = 4L
@ -42279,11 +42209,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
SyntaxId = 53L
},
new
{
FilterListId = 2086L,
SyntaxId = 4L
},
new
{
FilterListId = 2087L,
SyntaxId = 2L
@ -42299,11 +42224,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
SyntaxId = 4L
},
new
{
FilterListId = 2090L,
SyntaxId = 4L
},
new
{
FilterListId = 2091L,
SyntaxId = 4L
@ -42324,6 +42244,11 @@ protected override void BuildModel(ModelBuilder modelBuilder)
SyntaxId = 4L
},
new
{
FilterListId = 2095L,
SyntaxId = 6L
},
new
{
FilterListId = 2096L,
SyntaxId = 4L
@ -57305,11 +57230,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
TagId = 4L
},
new
{
FilterListId = 2080L,
TagId = 3L
},
new
{
FilterListId = 2081L,
TagId = 8L
@ -57320,11 +57240,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
TagId = 15L
},
new
{
FilterListId = 2083L,
TagId = 15L
},
new
{
FilterListId = 2084L,
TagId = 15L
@ -57335,11 +57250,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
TagId = 10L
},
new
{
FilterListId = 2086L,
TagId = 15L
},
new
{
FilterListId = 2087L,
TagId = 6L
@ -57355,11 +57265,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
TagId = 31L
},
new
{
FilterListId = 2090L,
TagId = 31L
},
new
{
FilterListId = 2091L,
TagId = 2L
@ -57380,6 +57285,11 @@ protected override void BuildModel(ModelBuilder modelBuilder)
TagId = 9L
},
new
{
FilterListId = 2095L,
TagId = 6L
},
new
{
FilterListId = 2096L,
TagId = 9L
@ -82776,14 +82686,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
Url = "https://raw.githubusercontent.com/Yuki2718/adblock/master/adguard/social-plus.txt"
},
new
{
FilterListId = 2080L,
Id = 2187L,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/Yuki2718/adblock/master/adguard/tracking-plus.txt"
},
new
{
FilterListId = 2081L,
Id = 2188L,
@ -82800,14 +82702,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
Url = "https://raw.githubusercontent.com/Yuki2718/adblock/master/japanese/blog-parts.txt"
},
new
{
FilterListId = 2083L,
Id = 2190L,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/Yuki2718/adblock/master/japanese/blog-parts-adult.txt"
},
new
{
FilterListId = 2084L,
Id = 2191L,
@ -82824,14 +82718,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
Url = "https://raw.githubusercontent.com/Yuki2718/adblock/master/medium_mode/dynamic-rules.txt"
},
new
{
FilterListId = 2086L,
Id = 2193L,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/Yuki2718/adblock/master/medium_mode/static-rules.txt"
},
new
{
FilterListId = 2087L,
Id = 2194L,
@ -82856,14 +82742,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
Url = "https://raw.githubusercontent.com/Yuki2718/adblock/master/no_gen_cosm/phhider.txt"
},
new
{
FilterListId = 2090L,
Id = 2197L,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/Yuki2718/adblock/master/no_gen_cosm/phhider-mob.txt"
},
new
{
FilterListId = 2091L,
Id = 2198L,
@ -82896,6 +82774,14 @@ protected override void BuildModel(ModelBuilder modelBuilder)
Url = "https://raw.githubusercontent.com/Yuki2718/adblock/master/japanese/jp-annoyances.txt"
},
new
{
FilterListId = 2095L,
Id = 2202L,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/Yuki2718/adblock/master/japanese/280-patch.txt"
},
new
{
FilterListId = 2099L,
Id = 2203L,