feat(data): migrate PR #4219

This commit is contained in:
Azure Pipelines EF Migration Bot 2024-04-07 15:24:10 +00:00 committed by Collin Barrett
parent c50632c991
commit 2dcca5042a
3 changed files with 88500 additions and 8 deletions

View file

@ -0,0 +1,184 @@
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 _4219 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.InsertData(
table: "filter_list_syntaxes",
columns: new[] { "filter_list_id", "syntax_id" },
values: new object[,]
{
{ 2657L, 3L },
{ 2657L, 6L },
{ 2657L, 16L },
{ 2657L, 20L },
{ 2657L, 24L },
{ 2657L, 28L },
{ 2658L, 2L },
{ 2658L, 6L },
{ 2658L, 16L },
{ 2658L, 20L },
{ 2658L, 24L },
{ 2658L, 28L }
});
migrationBuilder.InsertData(
table: "filter_list_tags",
columns: new[] { "filter_list_id", "tag_id" },
values: new object[,]
{
{ 2657L, 6L },
{ 2658L, 6L }
});
migrationBuilder.UpdateData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2657L, 2935L },
column: "url",
value: "https://raw.githubusercontent.com/jarelllama/Scam-Blocklist/main/lists/adblock/scams.txt");
migrationBuilder.UpdateData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2658L, 2936L },
column: "url",
value: "https://raw.githubusercontent.com/jarelllama/Scam-Blocklist/main/lists/adblock/scams_light.txt");
migrationBuilder.UpdateData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2657L,
columns: new[] { "description", "license_id" },
values: new object[] { "Blocklist for newly created scam domains retrieved daily using Google Search API, automated detection, and other public sources.", 4L });
migrationBuilder.UpdateData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2658L,
columns: new[] { "description", "license_id", "name" },
values: new object[] { "Light version of Jarelllama's Scam Blocklist.", 4L, "Jarelllama's Scam Blocklist LIGHT VERSION" });
migrationBuilder.InsertData(
table: "merges",
columns: new[] { "included_in_filter_list_id", "includes_filter_list_id" },
values: new object[] { 2657L, 2658L });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2657L, 3L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2657L, 6L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2657L, 16L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2657L, 20L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2657L, 24L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2657L, 28L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2658L, 2L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2658L, 6L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2658L, 16L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2658L, 20L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2658L, 24L });
migrationBuilder.DeleteData(
table: "filter_list_syntaxes",
keyColumns: new[] { "filter_list_id", "syntax_id" },
keyValues: new object[] { 2658L, 28L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2657L, 6L });
migrationBuilder.DeleteData(
table: "filter_list_tags",
keyColumns: new[] { "filter_list_id", "tag_id" },
keyValues: new object[] { 2658L, 6L });
migrationBuilder.DeleteData(
table: "merges",
keyColumns: new[] { "included_in_filter_list_id", "includes_filter_list_id" },
keyValues: new object[] { 2657L, 2658L });
migrationBuilder.UpdateData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2657L, 2935L },
column: "url",
value: "https://raw.githubusercontent.com/jarelllama/Scam-Blocklist/main/domains.txt");
migrationBuilder.UpdateData(
table: "filter_list_view_urls",
keyColumns: new[] { "filter_list_id", "id" },
keyValues: new object[] { 2658L, 2936L },
column: "url",
value: "https://raw.githubusercontent.com/jarelllama/Scam-Blocklist/main/adblock.txt");
migrationBuilder.UpdateData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2657L,
columns: new[] { "description", "license_id" },
values: new object[] { "Blocklist for scam sites extracted from Google", 5L });
migrationBuilder.UpdateData(
table: "filter_lists",
keyColumn: "id",
keyValue: 2658L,
columns: new[] { "description", "license_id", "name" },
values: new object[] { "Blocklist for scam sites extracted from Google", 5L, "Jarelllama's Scam Blocklist (ABP syntax)" });
}
}
}

View file

@ -19,7 +19,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.15")
.HasAnnotation("ProductVersion", "7.0.17")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "aggregate_type", new[] { "filter_list", "language", "license", "maintainer", "software", "syntax", "tag" });
@ -21807,22 +21807,22 @@ protected override void BuildModel(ModelBuilder modelBuilder)
new
{
Id = 2657L,
Description = "Blocklist for scam sites extracted from Google",
Description = "Blocklist for newly created scam domains retrieved daily using Google Search API, automated detection, and other public sources.",
HomeUrl = "https://github.com/jarelllama/Scam-Blocklist",
IsApproved = true,
IssuesUrl = "https://github.com/jarelllama/Scam-Blocklist/issues",
LicenseId = 5L,
LicenseId = 4L,
Name = "Jarelllama's Scam Blocklist"
},
new
{
Id = 2658L,
Description = "Blocklist for scam sites extracted from Google",
Description = "Light version of Jarelllama's Scam Blocklist.",
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)"
LicenseId = 4L,
Name = "Jarelllama's Scam Blocklist LIGHT VERSION"
},
new
{
@ -44544,11 +44544,71 @@ protected override void BuildModel(ModelBuilder modelBuilder)
SyntaxId = 2L
},
new
{
FilterListId = 2657L,
SyntaxId = 3L
},
new
{
FilterListId = 2657L,
SyntaxId = 6L
},
new
{
FilterListId = 2657L,
SyntaxId = 16L
},
new
{
FilterListId = 2657L,
SyntaxId = 20L
},
new
{
FilterListId = 2657L,
SyntaxId = 24L
},
new
{
FilterListId = 2657L,
SyntaxId = 28L
},
new
{
FilterListId = 2658L,
SyntaxId = 2L
},
new
{
FilterListId = 2658L,
SyntaxId = 3L
},
new
{
FilterListId = 2658L,
SyntaxId = 6L
},
new
{
FilterListId = 2658L,
SyntaxId = 16L
},
new
{
FilterListId = 2658L,
SyntaxId = 20L
},
new
{
FilterListId = 2658L,
SyntaxId = 24L
},
new
{
FilterListId = 2658L,
SyntaxId = 28L
},
new
{
FilterListId = 2659L,
SyntaxId = 1L
@ -60450,11 +60510,21 @@ protected override void BuildModel(ModelBuilder modelBuilder)
TagId = 24L
},
new
{
FilterListId = 2657L,
TagId = 6L
},
new
{
FilterListId = 2657L,
TagId = 7L
},
new
{
FilterListId = 2658L,
TagId = 6L
},
new
{
FilterListId = 2658L,
TagId = 7L
@ -64136,6 +64206,11 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
IncludedInFilterListId = 566L,
IncludesFilterListId = 586L
},
new
{
IncludedInFilterListId = 2657L,
IncludesFilterListId = 2658L
});
});
@ -87781,7 +87856,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
Id = 2935L,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/jarelllama/Scam-Blocklist/main/domains.txt"
Url = "https://raw.githubusercontent.com/jarelllama/Scam-Blocklist/main/lists/adblock/scams.txt"
},
new
{
@ -87789,7 +87864,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
Id = 2936L,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/jarelllama/Scam-Blocklist/main/adblock.txt"
Url = "https://raw.githubusercontent.com/jarelllama/Scam-Blocklist/main/lists/adblock/scams_light.txt"
},
new
{