mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
feat(data): migrate PR #2554
This commit is contained in:
parent
24839f75ea
commit
22da584042
3 changed files with 85706 additions and 2 deletions
85580
services/Directory/FilterLists.Directory.Infrastructure.Migrations/Migrations/20210917120936_2554.Designer.cs
generated
Normal file
85580
services/Directory/FilterLists.Directory.Infrastructure.Migrations/Migrations/20210917120936_2554.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,87 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
|
||||
{
|
||||
public partial class _2554 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.InsertData(
|
||||
table: "FilterListTags",
|
||||
columns: new[] { "FilterListId", "TagId" },
|
||||
values: new object[] { 2, 2 });
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "FilterLists",
|
||||
keyColumn: "Id",
|
||||
keyValue: 2081,
|
||||
column: "Name",
|
||||
value: "Yuki's Cookie Dialogue filters");
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "FilterLists",
|
||||
columns: new[] { "Id", "ChatUrl", "Description", "DonateUrl", "EmailAddress", "ForumUrl", "HomeUrl", "IssuesUrl", "LicenseId", "Name", "OnionUrl", "PolicyUrl", "SubmissionUrl" },
|
||||
values: new object[] { 1, null, "Add this if you use Yuki's uBlock Japanese filters with uBlock Origin on Firefox for Mobile.", null, null, null, "https://github.com/Yuki2718/adblock", "https://github.com/Yuki2718/adblock/issues", 8, "Yuki's uBlock Japanese filters - Mobile", null, null, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "FilterListLanguages",
|
||||
columns: new[] { "FilterListId", "Iso6391" },
|
||||
values: new object[] { 1, "ja" });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "FilterListMaintainers",
|
||||
columns: new[] { "FilterListId", "MaintainerId" },
|
||||
values: new object[] { 1, 150 });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "FilterListSyntaxes",
|
||||
columns: new[] { "FilterListId", "SyntaxId" },
|
||||
values: new object[] { 1, 4 });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "FilterListViewUrls",
|
||||
columns: new[] { "Id", "FilterListId", "Primariness", "Url" },
|
||||
values: new object[] { 1, 1, (short)1, "https://raw.githubusercontent.com/Yuki2718/adblock/master/japanese/jp-mob.txt" });
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DeleteData(
|
||||
table: "FilterListLanguages",
|
||||
keyColumns: new[] { "FilterListId", "Iso6391" },
|
||||
keyValues: new object[] { 1, "ja" });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "FilterListMaintainers",
|
||||
keyColumns: new[] { "FilterListId", "MaintainerId" },
|
||||
keyValues: new object[] { 1, 150 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "FilterListSyntaxes",
|
||||
keyColumns: new[] { "FilterListId", "SyntaxId" },
|
||||
keyValues: new object[] { 1, 4 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "FilterListTags",
|
||||
keyColumns: new[] { "FilterListId", "TagId" },
|
||||
keyValues: new object[] { 2, 2 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "FilterListViewUrls",
|
||||
keyColumn: "Id",
|
||||
keyValue: 1);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "FilterLists",
|
||||
keyColumn: "Id",
|
||||
keyValue: 1);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "FilterLists",
|
||||
keyColumn: "Id",
|
||||
keyValue: 2081,
|
||||
column: "Name",
|
||||
value: "Sabre Filters 2");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
|
|||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63)
|
||||
.HasAnnotation("ProductVersion", "5.0.7")
|
||||
.HasAnnotation("ProductVersion", "5.0.10")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Dependent", b =>
|
||||
|
|
@ -127,6 +127,15 @@ protected override void BuildModel(ModelBuilder modelBuilder)
|
|||
b.ToTable("FilterLists");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Id = 1,
|
||||
Description = "Add this if you use Yuki's uBlock Japanese filters with uBlock Origin on Firefox for Mobile.",
|
||||
HomeUrl = "https://github.com/Yuki2718/adblock",
|
||||
IssuesUrl = "https://github.com/Yuki2718/adblock/issues",
|
||||
LicenseId = 8,
|
||||
Name = "Yuki's uBlock Japanese filters - Mobile"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 2,
|
||||
|
|
@ -15780,7 +15789,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
|
|||
HomeUrl = "https://github.com/Yuki2718/adblock",
|
||||
IssuesUrl = "https://github.com/Yuki2718/adblock/issues",
|
||||
LicenseId = 8,
|
||||
Name = "Sabre Filters 2"
|
||||
Name = "Yuki's Cookie Dialogue filters"
|
||||
},
|
||||
new
|
||||
{
|
||||
|
|
@ -19767,6 +19776,11 @@ protected override void BuildModel(ModelBuilder modelBuilder)
|
|||
b.ToTable("FilterListLanguages");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
FilterListId = 1,
|
||||
Iso6391 = "ja"
|
||||
},
|
||||
new
|
||||
{
|
||||
FilterListId = 6,
|
||||
|
|
@ -24499,6 +24513,11 @@ protected override void BuildModel(ModelBuilder modelBuilder)
|
|||
b.ToTable("FilterListMaintainers");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
FilterListId = 1,
|
||||
MaintainerId = 150
|
||||
},
|
||||
new
|
||||
{
|
||||
FilterListId = 2,
|
||||
|
|
@ -31836,6 +31855,11 @@ protected override void BuildModel(ModelBuilder modelBuilder)
|
|||
b.ToTable("FilterListSyntaxes");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
FilterListId = 1,
|
||||
SyntaxId = 4
|
||||
},
|
||||
new
|
||||
{
|
||||
FilterListId = 2,
|
||||
|
|
@ -42863,6 +42887,11 @@ protected override void BuildModel(ModelBuilder modelBuilder)
|
|||
b.ToTable("FilterListTags");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
FilterListId = 2,
|
||||
TagId = 2
|
||||
},
|
||||
new
|
||||
{
|
||||
FilterListId = 2,
|
||||
|
|
@ -58892,6 +58921,14 @@ protected override void BuildModel(ModelBuilder modelBuilder)
|
|||
b.ToTable("FilterListViewUrls");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Id = 1,
|
||||
FilterListId = 1,
|
||||
Primariness = (short)1,
|
||||
SegmentNumber = (short)0,
|
||||
Url = "https://raw.githubusercontent.com/Yuki2718/adblock/master/japanese/jp-mob.txt"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 2,
|
||||
|
|
|
|||
Loading…
Reference in a new issue