feat(data): migrate PR #3140

This commit is contained in:
Azure Pipelines EF Migration Bot 2022-06-19 22:07:03 +00:00 committed by Collin M. Barrett
parent f36b95ecd9
commit 5fc4977113
3 changed files with 89699 additions and 1 deletions

View file

@ -0,0 +1,151 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
{
public partial class _3140 : Migration
{
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[,]
{
{ 2608L, null, "Finally, an optimal and extensive list for blocking ads and trackers on Persian language sites!", null, null, null, "https://github.com/MasterKia/PersianBlocker", true, "https://github.com/MasterKia/PersianBlocker/issues", 4L, "PersianBlocker: Official Regional Persian/Iranian Domains and Cosmetic Blocklist", null, null, null },
{ 2609L, null, "Finally, an optimal and extensive list for blocking ads and trackers on Persian language sites! (PiHole domains edition)", null, null, null, "https://github.com/MasterKia/PersianBlocker", true, "https://github.com/MasterKia/PersianBlocker/issues", 4L, "PersianPiHole: List of Regional Persian/Iranian Domains-Only Blocklist", null, null, null }
});
migrationBuilder.InsertData(
table: "maintainers",
columns: new[] { "id", "email_address", "is_approved", "name", "twitter_handle", "url" },
values: new object[] { 183L, null, true, "MasterKia", null, "https://github.com/MasterKia" });
migrationBuilder.InsertData(
table: "filter_list_languages",
columns: new[] { "filter_list_id", "language_id" },
values: new object[,]
{
{ 2608L, 42L },
{ 2609L, 42L }
});
migrationBuilder.InsertData(
table: "filter_list_maintainers",
columns: new[] { "filter_list_id", "maintainer_id" },
values: new object[,]
{
{ 2608L, 183L },
{ 2609L, 183L }
});
migrationBuilder.InsertData(
table: "filter_list_syntaxes",
columns: new[] { "filter_list_id", "syntax_id" },
values: new object[,]
{
{ 2608L, 4L },
{ 2609L, 2L }
});
migrationBuilder.InsertData(
table: "filter_list_tags",
columns: new[] { "filter_list_id", "tag_id" },
values: new object[,]
{
{ 2608L, 2L },
{ 2608L, 3L },
{ 2609L, 2L },
{ 2609L, 3L }
});
migrationBuilder.InsertData(
table: "filter_list_view_urls",
columns: new[] { "filter_list_id", "id", "primariness", "url" },
values: new object[,]
{
{ 2608L, 2874L, (short)1, "https://raw.githubusercontent.com/MasterKia/PersianBlocker/main/PersianBlocker.txt" },
{ 2609L, 2875L, (short)1, "https://raw.githubusercontent.com/MasterKia/PersianBlocker/main/PersianPiHole.txt" }
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "filter_list_languages",
keyColumns: new[] { "filter_list_id", "language_id" },
keyValues: new object[] { 2608L, 42L });
migrationBuilder.DeleteData(
table: "filter_list_languages",
keyColumns: new[] { "filter_list_id", "language_id" },
keyValues: new object[] { 2609L, 42L });
migrationBuilder.DeleteData(
table: "filter_list_maintainers",
keyColumns: new[] { "filter_list_id", "maintainer_id" },
keyValues: new object[] { 2608L, 183L });
migrationBuilder.DeleteData(
table: "filter_list_maintainers",
keyColumns: new[] { "filter_list_id", "maintainer_id" },
keyValues: new object[] { 2609L, 183L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2608L, 4L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2609L, 2L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2608L, 2L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2608L, 3L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2609L, 2L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2609L, 3L });
migrationBuilder.DeleteData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2608L, 2874L });
migrationBuilder.DeleteData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2609L, 2875L });
migrationBuilder.DeleteData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2608L);
migrationBuilder.DeleteData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2609L);
migrationBuilder.DeleteData(
table: "maintainers",
keyColumn: "id",
keyValue: 183L);
}
}
}

View file

@ -19,7 +19,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.5")
.HasAnnotation("ProductVersion", "6.0.6")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "aggregate_type", new[] { "filter_list", "language", "license", "maintainer", "software", "syntax", "tag" });
@ -22182,6 +22182,26 @@ protected override void BuildModel(ModelBuilder modelBuilder)
IssuesUrl = "https://github.com/DandelionSprout/adfilt/issues",
LicenseId = 35L,
Name = "Dandelion Sprout's Annoyances List 2nd Division Bachelors"
},
new
{
Id = 2608L,
Description = "Finally, an optimal and extensive list for blocking ads and trackers on Persian language sites!",
HomeUrl = "https://github.com/MasterKia/PersianBlocker",
IsApproved = true,
IssuesUrl = "https://github.com/MasterKia/PersianBlocker/issues",
LicenseId = 4L,
Name = "PersianBlocker: Official Regional Persian/Iranian Domains and Cosmetic Blocklist"
},
new
{
Id = 2609L,
Description = "Finally, an optimal and extensive list for blocking ads and trackers on Persian language sites! (PiHole domains edition)",
HomeUrl = "https://github.com/MasterKia/PersianBlocker",
IsApproved = true,
IssuesUrl = "https://github.com/MasterKia/PersianBlocker/issues",
LicenseId = 4L,
Name = "PersianPiHole: List of Regional Persian/Iranian Domains-Only Blocklist"
});
});
@ -26943,6 +26963,16 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
FilterListId = 2602L,
LanguageId = 113L
},
new
{
FilterListId = 2608L,
LanguageId = 42L
},
new
{
FilterListId = 2609L,
LanguageId = 42L
});
});
@ -34494,6 +34524,16 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
FilterListId = 2607L,
MaintainerId = 22L
},
new
{
FilterListId = 2608L,
MaintainerId = 183L
},
new
{
FilterListId = 2609L,
MaintainerId = 183L
});
});
@ -45535,6 +45575,16 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
FilterListId = 2607L,
SyntaxId = 4L
},
new
{
FilterListId = 2608L,
SyntaxId = 4L
},
new
{
FilterListId = 2609L,
SyntaxId = 2L
});
});
@ -61581,6 +61631,26 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
FilterListId = 2607L,
TagId = 22L
},
new
{
FilterListId = 2608L,
TagId = 2L
},
new
{
FilterListId = 2608L,
TagId = 3L
},
new
{
FilterListId = 2609L,
TagId = 2L
},
new
{
FilterListId = 2609L,
TagId = 3L
});
});
@ -64786,6 +64856,13 @@ protected override void BuildModel(ModelBuilder modelBuilder)
IsApproved = true,
Name = "HaGeZi",
Url = "https://github.com/hagezi"
},
new
{
Id = 183L,
IsApproved = true,
Name = "MasterKia",
Url = "https://github.com/MasterKia"
});
});
@ -89130,6 +89207,22 @@ protected override void BuildModel(ModelBuilder modelBuilder)
Primariness = (short)2,
SegmentNumber = (short)0,
Url = "https://gitlab.com/DandelionSprout/adfilt/-/raw/master/AnnoyancesList-2ndDivision.txt"
},
new
{
FilterListId = 2608L,
Id = 2874L,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/MasterKia/PersianBlocker/main/PersianBlocker.txt"
},
new
{
FilterListId = 2609L,
Id = 2875L,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/MasterKia/PersianBlocker/main/PersianPiHole.txt"
});
});