Implement PR #5176: Fix AdVoid lists syntax type and languages

- Update FilterListLanguage.json to add language ID 139 (Serbian) to all AdVoid filter lists
- Update FilterListSyntax.json to change syntax from 4 to 3 for AdVoid filter lists
- Generate EF Core migration FixAdVoidFilterListsSyntaxAndLanguages to capture database changes

Co-authored-by: collinbarrett <6483057+collinbarrett@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-09-30 00:34:04 +00:00 committed by Collin Barrett
parent a0dac6e9a7
commit 9ffc3626ed
5 changed files with 91506 additions and 10 deletions

View file

@ -0,0 +1,137 @@
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 FixAdVoidFilterListsSyntaxAndLanguages : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "FilterListSyntax",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2828, (short)4 });
migrationBuilder.DeleteData(
table: "FilterListSyntax",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2829, (short)4 });
migrationBuilder.DeleteData(
table: "FilterListSyntax",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2831, (short)4 });
migrationBuilder.DeleteData(
table: "FilterListSyntax",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2832, (short)4 });
migrationBuilder.DeleteData(
table: "FilterListSyntax",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2833, (short)4 });
migrationBuilder.InsertData(
table: "FilterListLanguage",
columns: new[] { "FilterListId", "LanguageId" },
values: new object[,]
{
{ 2828, (short)139 },
{ 2829, (short)139 },
{ 2830, (short)139 },
{ 2831, (short)139 },
{ 2832, (short)139 },
{ 2833, (short)139 }
});
migrationBuilder.InsertData(
table: "FilterListSyntax",
columns: new[] { "FilterListId", "SyntaxId" },
values: new object[,]
{
{ 2828, (short)3 },
{ 2829, (short)3 },
{ 2831, (short)3 },
{ 2832, (short)3 },
{ 2833, (short)3 }
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "FilterListLanguage",
keyColumns: new[] { "FilterListId", "LanguageId" },
keyValues: new object[] { 2828, (short)139 });
migrationBuilder.DeleteData(
table: "FilterListLanguage",
keyColumns: new[] { "FilterListId", "LanguageId" },
keyValues: new object[] { 2829, (short)139 });
migrationBuilder.DeleteData(
table: "FilterListLanguage",
keyColumns: new[] { "FilterListId", "LanguageId" },
keyValues: new object[] { 2830, (short)139 });
migrationBuilder.DeleteData(
table: "FilterListLanguage",
keyColumns: new[] { "FilterListId", "LanguageId" },
keyValues: new object[] { 2831, (short)139 });
migrationBuilder.DeleteData(
table: "FilterListLanguage",
keyColumns: new[] { "FilterListId", "LanguageId" },
keyValues: new object[] { 2832, (short)139 });
migrationBuilder.DeleteData(
table: "FilterListLanguage",
keyColumns: new[] { "FilterListId", "LanguageId" },
keyValues: new object[] { 2833, (short)139 });
migrationBuilder.DeleteData(
table: "FilterListSyntax",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2828, (short)3 });
migrationBuilder.DeleteData(
table: "FilterListSyntax",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2829, (short)3 });
migrationBuilder.DeleteData(
table: "FilterListSyntax",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2831, (short)3 });
migrationBuilder.DeleteData(
table: "FilterListSyntax",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2832, (short)3 });
migrationBuilder.DeleteData(
table: "FilterListSyntax",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2833, (short)3 });
migrationBuilder.InsertData(
table: "FilterListSyntax",
columns: new[] { "FilterListId", "SyntaxId" },
values: new object[,]
{
{ 2828, (short)4 },
{ 2829, (short)4 },
{ 2831, (short)4 },
{ 2832, (short)4 },
{ 2833, (short)4 }
});
}
}
}

View file

@ -25582,29 +25582,59 @@ protected override void BuildModel(ModelBuilder modelBuilder)
LanguageId = (short)37
},
new
{
FilterListId = 2828,
LanguageId = (short)139
},
new
{
FilterListId = 2829,
LanguageId = (short)37
},
new
{
FilterListId = 2829,
LanguageId = (short)139
},
new
{
FilterListId = 2830,
LanguageId = (short)37
},
new
{
FilterListId = 2830,
LanguageId = (short)139
},
new
{
FilterListId = 2831,
LanguageId = (short)37
},
new
{
FilterListId = 2831,
LanguageId = (short)139
},
new
{
FilterListId = 2832,
LanguageId = (short)37
},
new
{
FilterListId = 2832,
LanguageId = (short)139
},
new
{
FilterListId = 2833,
LanguageId = (short)37
},
new
{
FilterListId = 2833,
LanguageId = (short)139
});
});
@ -45353,12 +45383,12 @@ protected override void BuildModel(ModelBuilder modelBuilder)
new
{
FilterListId = 2828,
SyntaxId = (short)4
SyntaxId = (short)3
},
new
{
FilterListId = 2829,
SyntaxId = (short)4
SyntaxId = (short)3
},
new
{
@ -45368,17 +45398,17 @@ protected override void BuildModel(ModelBuilder modelBuilder)
new
{
FilterListId = 2831,
SyntaxId = (short)4
SyntaxId = (short)3
},
new
{
FilterListId = 2832,
SyntaxId = (short)4
SyntaxId = (short)3
},
new
{
FilterListId = 2833,
SyntaxId = (short)4
SyntaxId = (short)3
});
});

View file

@ -3563,24 +3563,48 @@
"filterListId": 2828,
"languageId": 37
},
{
"filterListId": 2828,
"languageId": 139
},
{
"filterListId": 2829,
"languageId": 37
},
{
"filterListId": 2829,
"languageId": 139
},
{
"filterListId": 2830,
"languageId": 37
},
{
"filterListId": 2830,
"languageId": 139
},
{
"filterListId": 2831,
"languageId": 37
},
{
"filterListId": 2831,
"languageId": 139
},
{
"filterListId": 2832,
"languageId": 37
},
{
"filterListId": 2832,
"languageId": 139
},
{
"filterListId": 2833,
"languageId": 37
},
{
"filterListId": 2833,
"languageId": 139
}
]

View file

@ -9333,11 +9333,11 @@
},
{
"filterListId": 2828,
"syntaxId": 4
"syntaxId": 3
},
{
"filterListId": 2829,
"syntaxId": 4
"syntaxId": 3
},
{
"filterListId": 2830,
@ -9345,14 +9345,14 @@
},
{
"filterListId": 2831,
"syntaxId": 4
"syntaxId": 3
},
{
"filterListId": 2832,
"syntaxId": 4
"syntaxId": 3
},
{
"filterListId": 2833,
"syntaxId": 4
"syntaxId": 3
}
]