feat(data): migrate PR #2458

This commit is contained in:
Azure Pipelines EF Migration Bot 2021-10-21 21:37:12 +00:00 committed by Collin M. Barrett
parent 90aa06f96b
commit 16a81a0d35
3 changed files with 84482 additions and 0 deletions

View file

@ -0,0 +1,99 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
{
public partial class _2458 : 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[,]
{
{ 2537, null, "Block malware, phishing, and scams for a more secure browser", null, null, null, "https://github.com/iam-py-test/my_filters_001", "https://github.com/iam-py-test/my_filters_001/issues", 28, "Malicious website blocklist", null, null, null },
{ 2538, null, "Block malware, phishing, and scams for a more secure browser (HOSTS version - not for uBlock Origin)", null, null, null, "https://github.com/iam-py-test/my_filters_001", null, 28, "Malicious website blocklist (HOSTS)", null, null, null }
});
migrationBuilder.InsertData(
table: "Maintainers",
columns: new[] { "Id", "EmailAddress", "Name", "TwitterHandle", "Url" },
values: new object[] { 165, null, "iam-py-test", null, "https://github.com/iam-py-test" });
migrationBuilder.InsertData(
table: "FilterListMaintainers",
columns: new[] { "FilterListId", "MaintainerId" },
values: new object[,]
{
{ 2537, 165 },
{ 2538, 165 }
});
migrationBuilder.InsertData(
table: "FilterListSyntaxes",
columns: new[] { "FilterListId", "SyntaxId" },
values: new object[,]
{
{ 2537, 4 },
{ 2538, 1 }
});
migrationBuilder.InsertData(
table: "FilterListViewUrls",
columns: new[] { "Id", "FilterListId", "Url" },
values: new object[,]
{
{ 2752, 2537, "https://raw.githubusercontent.com/iam-py-test/my_filters_001/main/antimalware.txt" },
{ 2753, 2538, "https://raw.githubusercontent.com/iam-py-test/my_filters_001/main/Alternative list formats/antimalware_hosts.txt" }
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "FilterListMaintainers",
keyColumns: new[] { "FilterListId", "MaintainerId" },
keyValues: new object[] { 2537, 165 });
migrationBuilder.DeleteData(
table: "FilterListMaintainers",
keyColumns: new[] { "FilterListId", "MaintainerId" },
keyValues: new object[] { 2538, 165 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2537, 4 });
migrationBuilder.DeleteData(
table: "FilterListSyntaxes",
keyColumns: new[] { "FilterListId", "SyntaxId" },
keyValues: new object[] { 2538, 1 });
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2752);
migrationBuilder.DeleteData(
table: "FilterListViewUrls",
keyColumn: "Id",
keyValue: 2753);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2537);
migrationBuilder.DeleteData(
table: "FilterLists",
keyColumn: "Id",
keyValue: 2538);
migrationBuilder.DeleteData(
table: "Maintainers",
keyColumn: "Id",
keyValue: 165);
}
}
}

View file

@ -19385,6 +19385,23 @@ protected override void BuildModel(ModelBuilder modelBuilder)
HomeUrl = "https://github.com/Arctic-Circle-System/Sketchy-Extension-and-Search-List/",
IssuesUrl = "https://github.com/Arctic-Circle-System/Sketchy-Extension-and-Search-List/issues/",
Name = "Extension-based Malware and Data-Sucking Search Engine hosts file"
},
new
{
Id = 2537,
Description = "Block malware, phishing, and scams for a more secure browser",
HomeUrl = "https://github.com/iam-py-test/my_filters_001",
IssuesUrl = "https://github.com/iam-py-test/my_filters_001/issues",
LicenseId = 28,
Name = "Malicious website blocklist"
},
new
{
Id = 2538,
Description = "Block malware, phishing, and scams for a more secure browser (HOSTS version - not for uBlock Origin)",
HomeUrl = "https://github.com/iam-py-test/my_filters_001",
LicenseId = 28,
Name = "Malicious website blocklist (HOSTS)"
});
});
@ -31309,6 +31326,16 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
FilterListId = 2535,
MaintainerId = 164
},
new
{
FilterListId = 2537,
MaintainerId = 165
},
new
{
FilterListId = 2538,
MaintainerId = 165
});
});
@ -42151,6 +42178,16 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
FilterListId = 2534,
SyntaxId = 39
},
new
{
FilterListId = 2537,
SyntaxId = 4
},
new
{
FilterListId = 2538,
SyntaxId = 1
});
});
@ -79246,6 +79283,22 @@ protected override void BuildModel(ModelBuilder modelBuilder)
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/hadig/Focus-for-Youtube/master/focus4yt.txt"
},
new
{
Id = 2752,
FilterListId = 2537,
Primariness = (short)0,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/iam-py-test/my_filters_001/main/antimalware.txt"
},
new
{
Id = 2753,
FilterListId = 2538,
Primariness = (short)0,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/iam-py-test/my_filters_001/main/Alternative list formats/antimalware_hosts.txt"
});
});
@ -81711,6 +81764,12 @@ protected override void BuildModel(ModelBuilder modelBuilder)
Name = "hadiG",
TwitterHandle = "hadigz1",
Url = "https://github.com/hadig"
},
new
{
Id = 165,
Name = "iam-py-test",
Url = "https://github.com/iam-py-test"
});
});