feat(data): migrate PR #3063

This commit is contained in:
Azure Pipelines EF Migration Bot 2022-05-18 22:15:50 +00:00 committed by Collin M. Barrett
parent 383b16caac
commit 981702621f
3 changed files with 89475 additions and 5 deletions

View file

@ -0,0 +1,299 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
{
public partial class _3063 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2550L, 2770L },
column: "url",
value: "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/adblock/whitelist-referral.txt");
migrationBuilder.UpdateData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2550L,
columns: new[] { "email_address", "home_url", "name" },
values: new object[] { null, "https://github.com/hagezi/dns-blocklists", "HaGeZi's Referral Whitelist" });
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[,]
{
{ 2591L, null, "Cleans the Internet and protects your privacy! Blocks Ads, Tracking, Metrics, Telemetry, Phishing, Malware, Scam, Fake, Coins and other Crap.", null, null, null, "https://github.com/hagezi/dns-blocklists", true, null, 11L, "HaGeZi's Multi DNS Blocklist (Hosts)", null, null, null },
{ 2592L, null, "Increases security significantly! Blocks Malware, Crypto, Coin, Spam, Scam and Phishing.", null, null, null, "https://github.com/hagezi/dns-blocklists", true, null, 11L, "HaGeZi's Threat Intelligence Feeds DNS Blocklist (Hosts)", null, null, null },
{ 2593L, null, "Protects against internet scams, traps & fakes! Blocks fake stores, -news, -science, -streaming, rip-offs, cost traps and co.", null, null, null, "https://github.com/hagezi/dns-blocklists", true, null, 11L, "HaGeZi's Fake DNS Blocklist (Hosts)", null, null, null },
{ 2594L, null, "Cleans the Internet and protects your privacy! Blocks Ads, Tracking, Metrics, Telemetry, Phishing, Malware, Scam, Fake, Coins and other Crap.", null, null, null, "https://github.com/hagezi/dns-blocklists", true, null, 11L, "HaGeZi's Multi DNS Blocklist (AdBlock/AdGuard)", null, null, null },
{ 2595L, null, "Increases security significantly! Blocks Malware, Crypto, Coin, Spam, Scam and Phishing.", null, null, null, "https://github.com/hagezi/dns-blocklists", true, null, 11L, "HaGeZi's Threat Intelligence Feeds DNS Blocklist (AdBlock/AdGuard)", null, null, null },
{ 2596L, null, "Protects against internet scams, traps & fakes! Blocks fake stores, -news, -science, -streaming, rip-offs, cost traps and co.", null, null, null, "https://github.com/hagezi/dns-blocklists", true, null, 11L, "HaGeZi's Fake DNS Blocklist (AdBlock/AdGuard)", null, null, null }
});
migrationBuilder.InsertData(
table: "filter_list_syntaxes",
columns: new[] { "filter_list_id", "syntax_id" },
values: new object[,]
{
{ 2591L, 1L },
{ 2592L, 1L },
{ 2593L, 1L },
{ 2594L, 47L },
{ 2595L, 47L },
{ 2596L, 47L }
});
migrationBuilder.InsertData(
table: "filter_list_tags",
columns: new[] { "filter_list_id", "tag_id" },
values: new object[,]
{
{ 2591L, 1L },
{ 2591L, 2L },
{ 2591L, 3L },
{ 2591L, 4L },
{ 2591L, 6L },
{ 2591L, 7L },
{ 2591L, 9L },
{ 2592L, 6L },
{ 2592L, 7L },
{ 2593L, 15L },
{ 2594L, 1L },
{ 2594L, 2L },
{ 2594L, 3L },
{ 2594L, 4L },
{ 2594L, 6L },
{ 2594L, 7L },
{ 2594L, 9L },
{ 2595L, 6L },
{ 2595L, 7L },
{ 2596L, 15L }
});
migrationBuilder.InsertData(
table: "filter_list_view_urls",
columns: new[] { "filter_list_id", "id", "primariness", "url" },
values: new object[,]
{
{ 2591L, 2856L, (short)1, "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/hosts/multi.txt" },
{ 2592L, 2857L, (short)1, "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/hosts/tif.txt" },
{ 2593L, 2858L, (short)1, "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/hosts/fake.txt" },
{ 2594L, 2859L, (short)1, "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/adblock/multi.txt" },
{ 2595L, 2860L, (short)1, "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/adblock/tif.txt" },
{ 2596L, 2861L, (short)1, "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/adblock/fake.txt" }
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2591L, 1L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2592L, 1L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2593L, 1L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2594L, 47L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2595L, 47L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2596L, 47L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2591L, 1L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2591L, 2L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2591L, 3L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2591L, 4L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2591L, 6L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2591L, 7L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2591L, 9L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2592L, 6L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2592L, 7L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2593L, 15L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2594L, 1L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2594L, 2L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2594L, 3L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2594L, 4L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2594L, 6L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2594L, 7L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2594L, 9L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2595L, 6L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2595L, 7L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2596L, 15L });
migrationBuilder.DeleteData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2591L, 2856L });
migrationBuilder.DeleteData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2592L, 2857L });
migrationBuilder.DeleteData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2593L, 2858L });
migrationBuilder.DeleteData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2594L, 2859L });
migrationBuilder.DeleteData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2595L, 2860L });
migrationBuilder.DeleteData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2596L, 2861L });
migrationBuilder.DeleteData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2591L);
migrationBuilder.DeleteData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2592L);
migrationBuilder.DeleteData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2593L);
migrationBuilder.DeleteData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2594L);
migrationBuilder.DeleteData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2595L);
migrationBuilder.DeleteData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2596L);
migrationBuilder.UpdateData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2550L, 2770L },
column: "url",
value: "https://raw.githubusercontent.com/Zelo72/adguard/main/whitelist.referral.adguard");
migrationBuilder.UpdateData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2550L,
columns: new[] { "email_address", "home_url", "name" },
values: new object[] { "zelo72@dismail.de", "https://github.com/Zelo72/adguard", "Zelo72's Referral Whitelist" });
}
}
}

View file

@ -19,7 +19,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.4")
.HasAnnotation("ProductVersion", "6.0.5")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "aggregate_type", new[] { "filter_list", "language", "license", "maintainer", "software", "syntax", "tag" });
@ -21625,11 +21625,10 @@ protected override void BuildModel(ModelBuilder modelBuilder)
new
{
Id = 2550L,
EmailAddress = "zelo72@dismail.de",
HomeUrl = "https://github.com/Zelo72/adguard",
HomeUrl = "https://github.com/hagezi/dns-blocklists",
IsApproved = true,
LicenseId = 11L,
Name = "Zelo72's Referral Whitelist"
Name = "HaGeZi's Referral Whitelist"
},
new
{
@ -22036,6 +22035,60 @@ protected override void BuildModel(ModelBuilder modelBuilder)
IsApproved = true,
LicenseId = 5L,
Name = "Bank of Lithuania Illegal websites"
},
new
{
Id = 2591L,
Description = "Cleans the Internet and protects your privacy! Blocks Ads, Tracking, Metrics, Telemetry, Phishing, Malware, Scam, Fake, Coins and other Crap.",
HomeUrl = "https://github.com/hagezi/dns-blocklists",
IsApproved = true,
LicenseId = 11L,
Name = "HaGeZi's Multi DNS Blocklist (Hosts)"
},
new
{
Id = 2592L,
Description = "Increases security significantly! Blocks Malware, Crypto, Coin, Spam, Scam and Phishing.",
HomeUrl = "https://github.com/hagezi/dns-blocklists",
IsApproved = true,
LicenseId = 11L,
Name = "HaGeZi's Threat Intelligence Feeds DNS Blocklist (Hosts)"
},
new
{
Id = 2593L,
Description = "Protects against internet scams, traps & fakes! Blocks fake stores, -news, -science, -streaming, rip-offs, cost traps and co.",
HomeUrl = "https://github.com/hagezi/dns-blocklists",
IsApproved = true,
LicenseId = 11L,
Name = "HaGeZi's Fake DNS Blocklist (Hosts)"
},
new
{
Id = 2594L,
Description = "Cleans the Internet and protects your privacy! Blocks Ads, Tracking, Metrics, Telemetry, Phishing, Malware, Scam, Fake, Coins and other Crap.",
HomeUrl = "https://github.com/hagezi/dns-blocklists",
IsApproved = true,
LicenseId = 11L,
Name = "HaGeZi's Multi DNS Blocklist (AdBlock/AdGuard)"
},
new
{
Id = 2595L,
Description = "Increases security significantly! Blocks Malware, Crypto, Coin, Spam, Scam and Phishing.",
HomeUrl = "https://github.com/hagezi/dns-blocklists",
IsApproved = true,
LicenseId = 11L,
Name = "HaGeZi's Threat Intelligence Feeds DNS Blocklist (AdBlock/AdGuard)"
},
new
{
Id = 2596L,
Description = "Protects against internet scams, traps & fakes! Blocks fake stores, -news, -science, -streaming, rip-offs, cost traps and co.",
HomeUrl = "https://github.com/hagezi/dns-blocklists",
IsApproved = true,
LicenseId = 11L,
Name = "HaGeZi's Fake DNS Blocklist (AdBlock/AdGuard)"
});
});
@ -45244,6 +45297,36 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
FilterListId = 2590L,
SyntaxId = 57L
},
new
{
FilterListId = 2591L,
SyntaxId = 1L
},
new
{
FilterListId = 2592L,
SyntaxId = 1L
},
new
{
FilterListId = 2593L,
SyntaxId = 1L
},
new
{
FilterListId = 2594L,
SyntaxId = 47L
},
new
{
FilterListId = 2595L,
SyntaxId = 47L
},
new
{
FilterListId = 2596L,
SyntaxId = 47L
});
});
@ -61080,6 +61163,106 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
FilterListId = 2589L,
TagId = 6L
},
new
{
FilterListId = 2591L,
TagId = 1L
},
new
{
FilterListId = 2591L,
TagId = 2L
},
new
{
FilterListId = 2591L,
TagId = 3L
},
new
{
FilterListId = 2591L,
TagId = 4L
},
new
{
FilterListId = 2591L,
TagId = 6L
},
new
{
FilterListId = 2591L,
TagId = 7L
},
new
{
FilterListId = 2591L,
TagId = 9L
},
new
{
FilterListId = 2592L,
TagId = 6L
},
new
{
FilterListId = 2592L,
TagId = 7L
},
new
{
FilterListId = 2593L,
TagId = 15L
},
new
{
FilterListId = 2594L,
TagId = 1L
},
new
{
FilterListId = 2594L,
TagId = 2L
},
new
{
FilterListId = 2594L,
TagId = 3L
},
new
{
FilterListId = 2594L,
TagId = 4L
},
new
{
FilterListId = 2594L,
TagId = 6L
},
new
{
FilterListId = 2594L,
TagId = 7L
},
new
{
FilterListId = 2594L,
TagId = 9L
},
new
{
FilterListId = 2595L,
TagId = 6L
},
new
{
FilterListId = 2595L,
TagId = 7L
},
new
{
FilterListId = 2596L,
TagId = 15L
});
});
@ -87781,7 +87964,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
Id = 2770L,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/Zelo72/adguard/main/whitelist.referral.adguard"
Url = "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/adblock/whitelist-referral.txt"
},
new
{
@ -88478,6 +88661,54 @@ protected override void BuildModel(ModelBuilder modelBuilder)
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://www.lb.lt/en/illegalwww?export=csv"
},
new
{
FilterListId = 2591L,
Id = 2856L,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/hosts/multi.txt"
},
new
{
FilterListId = 2592L,
Id = 2857L,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/hosts/tif.txt"
},
new
{
FilterListId = 2593L,
Id = 2858L,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/hosts/fake.txt"
},
new
{
FilterListId = 2594L,
Id = 2859L,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/adblock/multi.txt"
},
new
{
FilterListId = 2595L,
Id = 2860L,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/adblock/tif.txt"
},
new
{
FilterListId = 2596L,
Id = 2861L,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/adblock/fake.txt"
});
});