feat(data): migrate PR #2211

This commit is contained in:
Azure Pipelines EF Migration Bot 2021-02-08 19:29:45 +00:00 committed by Collin M. Barrett
parent fa13e4d356
commit d576f762b7
3 changed files with 83501 additions and 1 deletions

View file

@ -0,0 +1,251 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
{
public partial class _2211 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.InsertData(
table: "FilterLists",
columns: new[] { "Id", "ChatUrl", "Description", "DonateUrl", "EmailAddress", "ForumUrl", "HomeUrl", "IssuesUrl", "LicenseId", "Name", "OnionUrl", "PolicyUrl", "SubmissionUrl" },
values: new object[,]
{
{ 2439, null, "A filter list optimized for DNS level blocking of ads, analytics, crypto-jacking and other such threats/nuisances.", null, null, null, "https://github.com/arapurayil/aBL/", "https://github.com/arapurayil/aBL/issues", 4, "aBL - General", null, null, null },
{ 2440, null, "Blocks social media. Should only be used with aBL - General List", null, null, null, "https://github.com/arapurayil/aBL/", "https://github.com/arapurayil/aBL/issues", 4, "aBL - Addon - Social Media", null, null, null },
{ 2441, null, "Blocks porn, gambling, and snuff. Should only be used with aBL - General List", null, null, null, "https://github.com/arapurayil/aBL/", "https://github.com/arapurayil/aBL/issues", 4, "aBL - Addon - Porn, Gambling, Snuff", null, null, null },
{ 2442, null, "Blocks region/language specific domains. Should only be used with aBL - General List", null, null, null, "https://github.com/arapurayil/aBL/", "https://github.com/arapurayil/aBL/issues", 4, "aBL - Addon - Regional", null, null, null }
});
migrationBuilder.InsertData(
table: "Maintainers",
columns: new[] { "Id", "EmailAddress", "Name", "TwitterHandle", "Url" },
values: new object[] { 157, "dev@arapurayil.com", "arapurayil", null, "https://github.com/arapurayil/" });
migrationBuilder.InsertData(
table: "Dependents",
columns: new[] { "DependencyFilterListId", "DependentFilterListId" },
values: new object[,]
{
{ 2439, 2442 },
{ 2439, 2440 },
{ 2439, 2441 }
});
migrationBuilder.InsertData(
table: "FilterListLanguages",
columns: new[] { "FilterListId", "Iso6391" },
values: new object[,]
{
{ 2439, "en" },
{ 2442, "en" },
{ 2441, "en" },
{ 2440, "en" }
});
migrationBuilder.InsertData(
table: "FilterListSyntaxes",
columns: new[] { "FilterListId", "SyntaxId" },
values: new object[,]
{
{ 2439, 3 },
{ 2442, 3 },
{ 2441, 3 },
{ 2440, 3 }
});
migrationBuilder.InsertData(
table: "FilterListTags",
columns: new[] { "FilterListId", "TagId" },
values: new object[,]
{
{ 2441, 17 },
{ 2441, 15 },
{ 2441, 11 },
{ 2440, 4 },
{ 2442, 2 },
{ 2439, 20 },
{ 2439, 9 },
{ 2439, 7 },
{ 2439, 6 },
{ 2439, 3 },
{ 2439, 2 },
{ 2439, 1 }
});
migrationBuilder.InsertData(
table: "FilterListViewUrls",
columns: new[] { "Id", "FilterListId", "Primariness", "Url" },
values: new object[,]
{
{ 2641, 2439, (short)1, "https://github.com/arapurayil/aBL/raw/master/lists/general/filter_list.txt" },
{ 2643, 2441, (short)1, "https://raw.githubusercontent.com/arapurayil/aBL/master/lists/porn_gambling_snuff/filter_list.txt" },
{ 2642, 2440, (short)1, "https://raw.githubusercontent.com/arapurayil/aBL/master/lists/social/filter_list.txt" },
{ 2644, 2442, (short)1, "https://raw.githubusercontent.com/arapurayil/aBL/master/lists/regional/filter_list.txt" }
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Dependents",
keyColumns: new[] { "DependencyFilterListId", "DependentFilterListId" },
keyValues: new object[] { 2439, 2440 });
migrationBuilder.DeleteData(
table: "Dependents",
keyColumns: new[] { "DependencyFilterListId", "DependentFilterListId" },
keyValues: new object[] { 2439, 2441 });
migrationBuilder.DeleteData(
table: "Dependents",
keyColumns: new[] { "DependencyFilterListId", "DependentFilterListId" },
keyValues: new object[] { 2439, 2442 });
migrationBuilder.DeleteData(
table: "FilterListLanguages",
keyColumns: new[] { "FilterListId", "Iso6391" },
keyValues: new object[] { 2439, "en" });
migrationBuilder.DeleteData(
table: "FilterListLanguages",
keyColumns: new[] { "FilterListId", "Iso6391" },
keyValues: new object[] { 2440, "en" });
migrationBuilder.DeleteData(
table: "FilterListLanguages",
keyColumns: new[] { "FilterListId", "Iso6391" },
keyValues: new object[] { 2441, "en" });
migrationBuilder.DeleteData(
table: "FilterListLanguages",
keyColumns: new[] { "FilterListId", "Iso6391" },
keyValues: new object[] { 2442, "en" });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2439, 3 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2440, 3 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2441, 3 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2442, 3 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2439, 1 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2439, 2 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2439, 3 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2439, 6 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2439, 7 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2439, 9 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2439, 20 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2440, 4 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2441, 11 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2441, 15 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2441, 17 });
migrationBuilder.DeleteData(
table: "FilterListTags",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2442, 2 });
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2641);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2642);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2643);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2644);
migrationBuilder.DeleteData(
table: "Maintainers",
keyColumn: "Id",
keyValue: 157);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2439);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2440);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2441);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2442);
}
}
}

View file

@ -17,7 +17,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
modelBuilder
.UseIdentityByDefaultColumns()
.HasAnnotation("Relational:MaxIdentifierLength", 63)
.HasAnnotation("ProductVersion", "5.0.1");
.HasAnnotation("ProductVersion", "5.0.2");
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Dependent", b =>
{
@ -58,6 +58,21 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
DependencyFilterListId = 347,
DependentFilterListId = 1817
},
new
{
DependencyFilterListId = 2439,
DependentFilterListId = 2440
},
new
{
DependencyFilterListId = 2439,
DependentFilterListId = 2441
},
new
{
DependencyFilterListId = 2439,
DependentFilterListId = 2442
});
});
@ -19049,6 +19064,42 @@ protected override void BuildModel(ModelBuilder modelBuilder)
IssuesUrl = "https://gitlab.com/curben/phishing-filter/issues",
LicenseId = 8,
Name = "phishing-filter (IE)"
},
new
{
Id = 2439,
Description = "A filter list optimized for DNS level blocking of ads, analytics, crypto-jacking and other such threats/nuisances.",
HomeUrl = "https://github.com/arapurayil/aBL/",
IssuesUrl = "https://github.com/arapurayil/aBL/issues",
LicenseId = 4,
Name = "aBL - General"
},
new
{
Id = 2440,
Description = "Blocks social media. Should only be used with aBL - General List",
HomeUrl = "https://github.com/arapurayil/aBL/",
IssuesUrl = "https://github.com/arapurayil/aBL/issues",
LicenseId = 4,
Name = "aBL - Addon - Social Media"
},
new
{
Id = 2441,
Description = "Blocks porn, gambling, and snuff. Should only be used with aBL - General List",
HomeUrl = "https://github.com/arapurayil/aBL/",
IssuesUrl = "https://github.com/arapurayil/aBL/issues",
LicenseId = 4,
Name = "aBL - Addon - Porn, Gambling, Snuff"
},
new
{
Id = 2442,
Description = "Blocks region/language specific domains. Should only be used with aBL - General List",
HomeUrl = "https://github.com/arapurayil/aBL/",
IssuesUrl = "https://github.com/arapurayil/aBL/issues",
LicenseId = 4,
Name = "aBL - Addon - Regional"
});
});
@ -23781,6 +23832,26 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
FilterListId = 2435,
Iso6391 = "sh"
},
new
{
FilterListId = 2439,
Iso6391 = "en"
},
new
{
FilterListId = 2440,
Iso6391 = "en"
},
new
{
FilterListId = 2441,
Iso6391 = "en"
},
new
{
FilterListId = 2442,
Iso6391 = "en"
});
});
@ -41465,6 +41536,26 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
FilterListId = 2438,
SyntaxId = 10
},
new
{
FilterListId = 2439,
SyntaxId = 3
},
new
{
FilterListId = 2440,
SyntaxId = 3
},
new
{
FilterListId = 2441,
SyntaxId = 3
},
new
{
FilterListId = 2442,
SyntaxId = 3
});
});
@ -56917,6 +57008,66 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
FilterListId = 2438,
TagId = 7
},
new
{
FilterListId = 2439,
TagId = 1
},
new
{
FilterListId = 2439,
TagId = 2
},
new
{
FilterListId = 2439,
TagId = 3
},
new
{
FilterListId = 2439,
TagId = 6
},
new
{
FilterListId = 2439,
TagId = 7
},
new
{
FilterListId = 2439,
TagId = 9
},
new
{
FilterListId = 2439,
TagId = 20
},
new
{
FilterListId = 2440,
TagId = 4
},
new
{
FilterListId = 2441,
TagId = 11
},
new
{
FilterListId = 2441,
TagId = 15
},
new
{
FilterListId = 2441,
TagId = 17
},
new
{
FilterListId = 2442,
TagId = 2
});
});
@ -77903,6 +78054,38 @@ protected override void BuildModel(ModelBuilder modelBuilder)
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://curben.gitlab.io/phishing-filter-mirror/phishing-filter.tpl"
},
new
{
Id = 2641,
FilterListId = 2439,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://github.com/arapurayil/aBL/raw/master/lists/general/filter_list.txt"
},
new
{
Id = 2642,
FilterListId = 2440,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/arapurayil/aBL/master/lists/social/filter_list.txt"
},
new
{
Id = 2643,
FilterListId = 2441,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/arapurayil/aBL/master/lists/porn_gambling_snuff/filter_list.txt"
},
new
{
Id = 2644,
FilterListId = 2442,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/arapurayil/aBL/master/lists/regional/filter_list.txt"
});
});
@ -80315,6 +80498,13 @@ protected override void BuildModel(ModelBuilder modelBuilder)
Id = 156,
Name = "FTPiHole",
Url = "https://www.ftpihole.com/"
},
new
{
Id = 157,
EmailAddress = "dev@arapurayil.com",
Name = "arapurayil",
Url = "https://github.com/arapurayil/"
});
});