feat(data): migrate PR #4247

This commit is contained in:
Azure Pipelines EF Migration Bot 2024-04-19 12:52:39 +00:00 committed by Collin Barrett
parent 7678b13754
commit 74347f12ae
3 changed files with 88638 additions and 2 deletions

View file

@ -0,0 +1,175 @@
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 _4247 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2669L,
column: "donate_url",
value: "https://donatello.to/serhiyguryev");
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[,]
{
{ 2670L, null, "Removes ads from Ukrainian websites", "https://donatello.to/serhiyguryev", null, null, "https://github.com/serhiyguryev/ukrainian-filters", true, "https://github.com/serhiyguryev/ukrainian-filters/issues", 4L, "Ukrainian Ad Filter", null, null, null },
{ 2671L, null, "Blocks irritating elements on Ukrainian and some popular foreign websites (cookie notices, pop-ups, banners etc.)", "https://donatello.to/serhiyguryev", null, null, "https://github.com/serhiyguryev/ukrainian-filters", true, "https://github.com/serhiyguryev/ukrainian-filters/issues", 4L, "Ukrainian Annoyance Filter", null, null, null },
{ 2672L, null, "Blocks trackers and harmful scripts, reduces the ability of third parties to collect data about your browsing behavior", "https://donatello.to/serhiyguryev", null, null, "https://github.com/serhiyguryev/ukrainian-filters", true, "https://github.com/serhiyguryev/ukrainian-filters/issues", 4L, "Ukrainian Privacy Filter", null, null, null }
});
migrationBuilder.InsertData(
table: "maintainers",
columns: new[] { "id", "email_address", "is_approved", "name", "twitter_handle", "url" },
values: new object[] { 192L, null, true, "Serhiy Guryev", null, "https://github.com/serhiyguryev" });
migrationBuilder.InsertData(
table: "filter_list_maintainers",
columns: new[] { "filter_list_id", "maintainer_id" },
values: new object[,]
{
{ 2669L, 192L },
{ 2670L, 192L },
{ 2671L, 192L },
{ 2672L, 192L }
});
migrationBuilder.InsertData(
table: "filter_list_syntaxes",
columns: new[] { "filter_list_id", "syntax_id" },
values: new object[,]
{
{ 2670L, 4L },
{ 2671L, 4L },
{ 2672L, 4L }
});
migrationBuilder.InsertData(
table: "filter_list_tags",
columns: new[] { "filter_list_id", "tag_id" },
values: new object[,]
{
{ 2670L, 2L },
{ 2671L, 9L },
{ 2672L, 3L }
});
migrationBuilder.InsertData(
table: "filter_list_view_urls",
columns: new[] { "filter_list_id", "id", "primariness", "url" },
values: new object[,]
{
{ 2670L, 2954L, (short)1, "https://raw.githubusercontent.com/serhiyguryev/ukrainian-filters/main/filters/ads.txt" },
{ 2671L, 2955L, (short)1, "https://raw.githubusercontent.com/serhiyguryev/ukrainian-filters/main/filters/annoyances.txt" },
{ 2672L, 2956L, (short)1, "https://raw.githubusercontent.com/serhiyguryev/ukrainian-filters/main/filters/privacy.txt" }
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "filter_list_maintainers",
keyColumns: new[] { "filter_list_id", "maintainer_id" },
keyValues: new object[] { 2669L, 192L });
migrationBuilder.DeleteData(
table: "filter_list_maintainers",
keyColumns: new[] { "filter_list_id", "maintainer_id" },
keyValues: new object[] { 2670L, 192L });
migrationBuilder.DeleteData(
table: "filter_list_maintainers",
keyColumns: new[] { "filter_list_id", "maintainer_id" },
keyValues: new object[] { 2671L, 192L });
migrationBuilder.DeleteData(
table: "filter_list_maintainers",
keyColumns: new[] { "filter_list_id", "maintainer_id" },
keyValues: new object[] { 2672L, 192L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2670L, 4L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2671L, 4L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2672L, 4L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2670L, 2L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2671L, 9L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2672L, 3L });
migrationBuilder.DeleteData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2670L, 2954L });
migrationBuilder.DeleteData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2671L, 2955L });
migrationBuilder.DeleteData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2672L, 2956L });
migrationBuilder.DeleteData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2670L);
migrationBuilder.DeleteData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2671L);
migrationBuilder.DeleteData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2672L);
migrationBuilder.DeleteData(
table: "maintainers",
keyColumn: "id",
keyValue: 192L);
migrationBuilder.UpdateData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2669L,
column: "donate_url",
value: "https://www.paypal.com/donate/?hosted_button_id=AQ9BB34WHFADC");
}
}
}

View file

@ -19,7 +19,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.17")
.HasAnnotation("ProductVersion", "7.0.18")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "aggregate_type", new[] { "filter_list", "language", "license", "maintainer", "software", "syntax", "tag" });
@ -21938,12 +21938,45 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
Id = 2669L,
Description = "Filter of malicious web resources (phishing, online fraud, malware, etc.) targeting Ukrainian citizens",
DonateUrl = "https://www.paypal.com/donate/?hosted_button_id=AQ9BB34WHFADC",
DonateUrl = "https://donatello.to/serhiyguryev",
HomeUrl = "https://github.com/braveinnovators/ukrainian-security-filter",
IsApproved = true,
IssuesUrl = "https://github.com/braveinnovators/ukrainian-security-filter/issues",
LicenseId = 4L,
Name = "Ukrainian Security Filter"
},
new
{
Id = 2670L,
Description = "Removes ads from Ukrainian websites",
DonateUrl = "https://donatello.to/serhiyguryev",
HomeUrl = "https://github.com/serhiyguryev/ukrainian-filters",
IsApproved = true,
IssuesUrl = "https://github.com/serhiyguryev/ukrainian-filters/issues",
LicenseId = 4L,
Name = "Ukrainian Ad Filter"
},
new
{
Id = 2671L,
Description = "Blocks irritating elements on Ukrainian and some popular foreign websites (cookie notices, pop-ups, banners etc.)",
DonateUrl = "https://donatello.to/serhiyguryev",
HomeUrl = "https://github.com/serhiyguryev/ukrainian-filters",
IsApproved = true,
IssuesUrl = "https://github.com/serhiyguryev/ukrainian-filters/issues",
LicenseId = 4L,
Name = "Ukrainian Annoyance Filter"
},
new
{
Id = 2672L,
Description = "Blocks trackers and harmful scripts, reduces the ability of third parties to collect data about your browsing behavior",
DonateUrl = "https://donatello.to/serhiyguryev",
HomeUrl = "https://github.com/serhiyguryev/ukrainian-filters",
IsApproved = true,
IssuesUrl = "https://github.com/serhiyguryev/ukrainian-filters/issues",
LicenseId = 4L,
Name = "Ukrainian Privacy Filter"
});
});
@ -33706,6 +33739,26 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
FilterListId = 2668L,
MaintainerId = 22L
},
new
{
FilterListId = 2669L,
MaintainerId = 192L
},
new
{
FilterListId = 2670L,
MaintainerId = 192L
},
new
{
FilterListId = 2671L,
MaintainerId = 192L
},
new
{
FilterListId = 2672L,
MaintainerId = 192L
});
});
@ -44657,6 +44710,21 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
FilterListId = 2669L,
SyntaxId = 3L
},
new
{
FilterListId = 2670L,
SyntaxId = 4L
},
new
{
FilterListId = 2671L,
SyntaxId = 4L
},
new
{
FilterListId = 2672L,
SyntaxId = 4L
});
});
@ -60598,6 +60666,21 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
FilterListId = 2669L,
TagId = 7L
},
new
{
FilterListId = 2670L,
TagId = 2L
},
new
{
FilterListId = 2671L,
TagId = 9L
},
new
{
FilterListId = 2672L,
TagId = 3L
});
});
@ -63860,6 +63943,13 @@ protected override void BuildModel(ModelBuilder modelBuilder)
IsApproved = true,
Name = "Axonym",
Url = "https://github.com/Axonym"
},
new
{
Id = 192L,
IsApproved = true,
Name = "Serhiy Guryev",
Url = "https://github.com/serhiyguryev"
});
});
@ -88001,6 +88091,30 @@ protected override void BuildModel(ModelBuilder modelBuilder)
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/braveinnovators/ukrainian-security-filter/main/lists/adblock.txt"
},
new
{
FilterListId = 2670L,
Id = 2954L,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/serhiyguryev/ukrainian-filters/main/filters/ads.txt"
},
new
{
FilterListId = 2671L,
Id = 2955L,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/serhiyguryev/ukrainian-filters/main/filters/annoyances.txt"
},
new
{
FilterListId = 2672L,
Id = 2956L,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/serhiyguryev/ukrainian-filters/main/filters/privacy.txt"
});
});