feat(data): migrate PR #3569

This commit is contained in:
Azure Pipelines EF Migration Bot 2023-04-27 14:20:29 +00:00 committed by Collin Barrett
parent 62999cad30
commit 9d9a77e585
3 changed files with 90839 additions and 0 deletions

View file

@ -0,0 +1,125 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
{
/// <inheritdoc />
public partial class _3569 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
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[,]
{
{ 2657L, null, "Blocklist for scam sites extracted from Google", null, null, null, "https://github.com/jarelllama/Scam-Blocklist", true, "https://github.com/jarelllama/Scam-Blocklist/issues", 5L, "Jarelllama's Scam Blocklist", null, null, null },
{ 2658L, null, "Blocklist for scam sites extracted from Google", null, null, null, "https://github.com/jarelllama/Scam-Blocklist", true, "https://github.com/jarelllama/Scam-Blocklist/issues", 5L, "Jarelllama's Scam Blocklist (ABP syntax)", null, null, null }
});
migrationBuilder.InsertData(
table: "maintainers",
columns: new[] { "id", "email_address", "is_approved", "name", "twitter_handle", "url" },
values: new object[] { 188L, null, true, "jarelllama", null, "https://github.com/jarelllama" });
migrationBuilder.InsertData(
table: "filter_list_maintainers",
columns: new[] { "filter_list_id", "maintainer_id" },
values: new object[,]
{
{ 2657L, 188L },
{ 2658L, 188L }
});
migrationBuilder.InsertData(
table: "filter_list_syntaxes",
columns: new[] { "filter_list_id", "syntax_id" },
values: new object[,]
{
{ 2657L, 2L },
{ 2658L, 3L }
});
migrationBuilder.InsertData(
table: "filter_list_tags",
columns: new[] { "filter_list_id", "tag_id" },
values: new object[,]
{
{ 2657L, 7L },
{ 2658L, 7L }
});
migrationBuilder.InsertData(
table: "filter_list_view_urls",
columns: new[] { "filter_list_id", "id", "primariness", "url" },
values: new object[,]
{
{ 2657L, 2935L, (short)1, "https://raw.githubusercontent.com/jarelllama/Scam-Blocklist/main/domains.txt" },
{ 2658L, 2936L, (short)1, "https://raw.githubusercontent.com/jarelllama/Scam-Blocklist/main/adblock.txt" }
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "filter_list_maintainers",
keyColumns: new[] { "filter_list_id", "maintainer_id" },
keyValues: new object[] { 2657L, 188L });
migrationBuilder.DeleteData(
table: "filter_list_maintainers",
keyColumns: new[] { "filter_list_id", "maintainer_id" },
keyValues: new object[] { 2658L, 188L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2657L, 2L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2658L, 3L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2657L, 7L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2658L, 7L });
migrationBuilder.DeleteData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2657L, 2935L });
migrationBuilder.DeleteData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2658L, 2936L });
migrationBuilder.DeleteData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2657L);
migrationBuilder.DeleteData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2658L);
migrationBuilder.DeleteData(
table: "maintainers",
keyColumn: "id",
keyValue: 188L);
}
}
}

View file

@ -22503,6 +22503,26 @@ protected override void BuildModel(ModelBuilder modelBuilder)
IssuesUrl = "https://github.com/rotgruengelb/BlockModReposting/issues",
LicenseId = 8L,
Name = "BlockModReposting"
},
new
{
Id = 2657L,
Description = "Blocklist for scam sites extracted from Google",
HomeUrl = "https://github.com/jarelllama/Scam-Blocklist",
IsApproved = true,
IssuesUrl = "https://github.com/jarelllama/Scam-Blocklist/issues",
LicenseId = 5L,
Name = "Jarelllama's Scam Blocklist"
},
new
{
Id = 2658L,
Description = "Blocklist for scam sites extracted from Google",
HomeUrl = "https://github.com/jarelllama/Scam-Blocklist",
IsApproved = true,
IssuesUrl = "https://github.com/jarelllama/Scam-Blocklist/issues",
LicenseId = 5L,
Name = "Jarelllama's Scam Blocklist (ABP syntax)"
});
});
@ -35060,6 +35080,16 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
FilterListId = 2656L,
MaintainerId = 187L
},
new
{
FilterListId = 2657L,
MaintainerId = 188L
},
new
{
FilterListId = 2658L,
MaintainerId = 188L
});
});
@ -46271,6 +46301,16 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
FilterListId = 2656L,
SyntaxId = 6L
},
new
{
FilterListId = 2657L,
SyntaxId = 2L
},
new
{
FilterListId = 2658L,
SyntaxId = 3L
});
});
@ -62527,6 +62567,16 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
FilterListId = 2656L,
TagId = 24L
},
new
{
FilterListId = 2657L,
TagId = 7L
},
new
{
FilterListId = 2658L,
TagId = 7L
});
});
@ -65760,6 +65810,13 @@ protected override void BuildModel(ModelBuilder modelBuilder)
IsApproved = true,
Name = "rotgruengelb",
Url = "https://github.com/rotgruengelb"
},
new
{
Id = 188L,
IsApproved = true,
Name = "jarelllama",
Url = "https://github.com/jarelllama"
});
});
@ -90336,6 +90393,22 @@ protected override void BuildModel(ModelBuilder modelBuilder)
Primariness = (short)1,
SegmentNumber = (short)1,
Url = "https://raw.githubusercontent.com/rotgruengelb/BlockModReposting/main/list.txt"
},
new
{
FilterListId = 2657L,
Id = 2935L,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/jarelllama/Scam-Blocklist/main/domains.txt"
},
new
{
FilterListId = 2658L,
Id = 2936L,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/jarelllama/Scam-Blocklist/main/adblock.txt"
});
});