feat(data): migrate PR #3791

This commit is contained in:
Azure Pipelines EF Migration Bot 2023-08-16 21:45:12 +00:00 committed by Collin Barrett
parent a248e8eb07
commit eb3871185b
3 changed files with 87910 additions and 28 deletions

View file

@ -0,0 +1,58 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
{
/// <inheritdoc />
public partial class _3791 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2601L, 3L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2601L, 9L });
migrationBuilder.DeleteData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2601L, 2866L });
migrationBuilder.DeleteData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2601L);
}
/// <inheritdoc />
protected override void Down(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", "name", "onion_url", "policy_url", "submission_url" },
values: new object[] { 2601L, null, "Some custom cosmetic filters to be used for ublock origin & adguard. This filter is mainly for mobile browsing specifically for heavily modified AMP pages. Beware that this filter is very aggressive filters which disables the following from an webpage and is very effective if used with uBlock Origin and AdGuard.", null, null, null, "https://github.com/blogmangit/Cosmetic-Filters", true, null, "blogmangit Cosmetic-Filters", null, null, null });
migrationBuilder.InsertData(
table: "filter_list_syntaxes",
columns: new[] { "filter_list_id", "syntax_id" },
values: new object[] { 2601L, 3L });
migrationBuilder.InsertData(
table: "filter_list_tags",
columns: new[] { "filter_list_id", "tag_id" },
values: new object[] { 2601L, 9L });
migrationBuilder.InsertData(
table: "filter_list_view_urls",
columns: new[] { "filter_list_id", "id", "primariness", "url" },
values: new object[] { 2601L, 2866L, (short)1, "https://raw.githubusercontent.com/blogmangit/Cosmetic-Filters/main/cosmetic filters.txt" });
}
}
}

View file

@ -19,7 +19,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.8")
.HasAnnotation("ProductVersion", "7.0.10")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "aggregate_type", new[] { "filter_list", "language", "license", "maintainer", "software", "syntax", "tag" });
@ -21276,15 +21276,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
Name = "Scam Links - Links"
},
new
{
Id = 2601L,
Description = "Some custom cosmetic filters to be used for ublock origin & adguard. This filter is mainly for mobile browsing specifically for heavily modified AMP pages. Beware that this filter is very aggressive filters which disables the following from an webpage and is very effective if used with uBlock Origin and AdGuard.",
HomeUrl = "https://github.com/blogmangit/Cosmetic-Filters",
IsApproved = true,
LicenseId = 0L,
Name = "blogmangit Cosmetic-Filters"
},
new
{
Id = 2603L,
Description = "Adblocker list (experimental) which allows you to read articles from (supported) sites that implement a paywall. For some sites it will log you out (or block you to log in); caused by removing cookies or blocking general paywall-scripts. Disclaimer: the list doesn't support as many sites as the extension/add-on though.",
@ -44132,11 +44123,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
SyntaxId = 2L
},
new
{
FilterListId = 2601L,
SyntaxId = 3L
},
new
{
FilterListId = 2603L,
SyntaxId = 4L
@ -59953,11 +59939,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
TagId = 6L
},
new
{
FilterListId = 2601L,
TagId = 9L
},
new
{
FilterListId = 2603L,
TagId = 40L
@ -87056,14 +87037,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
Url = "https://raw.githubusercontent.com/DevSpen/links/master/src/links.txt"
},
new
{
FilterListId = 2601L,
Id = 2866L,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/blogmangit/Cosmetic-Filters/main/cosmetic filters.txt"
},
new
{
FilterListId = 2603L,
Id = 2867L,