mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
chore(dir): ♻ re-gen migrations
This commit is contained in:
parent
d3baec9326
commit
5b0bc6abe5
10 changed files with 350 additions and 262981 deletions
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,125 +0,0 @@
|
|||
using System;
|
||||
using System.Text.Json;
|
||||
using FilterLists.Directory.Domain.Aggregates;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
|
||||
{
|
||||
public partial class AddChanges : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterDatabase()
|
||||
.Annotation("Npgsql:Enum:aggregate_type", "filter_list,language,license,maintainer,software,syntax,tag");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "changes",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
reason = table.Column<string>(type: "text", nullable: true),
|
||||
submitted_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"),
|
||||
approved_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
|
||||
rejected_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
|
||||
rejected_reason = table.Column<string>(type: "text", nullable: true),
|
||||
before = table.Column<JsonDocument>(type: "jsonb", nullable: true),
|
||||
after = table.Column<JsonDocument>(type: "jsonb", nullable: true),
|
||||
aggregate_type = table.Column<AggregateType>(type: "aggregate_type", nullable: false),
|
||||
filter_list_id = table.Column<long>(type: "bigint", nullable: true),
|
||||
language_id = table.Column<long>(type: "bigint", nullable: true),
|
||||
license_id = table.Column<long>(type: "bigint", nullable: true),
|
||||
maintainer_id = table.Column<long>(type: "bigint", nullable: true),
|
||||
software_id = table.Column<long>(type: "bigint", nullable: true),
|
||||
syntax_id = table.Column<long>(type: "bigint", nullable: true),
|
||||
tag_id = table.Column<long>(type: "bigint", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_changes", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_changes_filter_lists_filter_list_id",
|
||||
column: x => x.filter_list_id,
|
||||
principalTable: "filter_lists",
|
||||
principalColumn: "id");
|
||||
table.ForeignKey(
|
||||
name: "fk_changes_languages_language_id",
|
||||
column: x => x.language_id,
|
||||
principalTable: "languages",
|
||||
principalColumn: "id");
|
||||
table.ForeignKey(
|
||||
name: "fk_changes_licenses_license_id",
|
||||
column: x => x.license_id,
|
||||
principalTable: "licenses",
|
||||
principalColumn: "id");
|
||||
table.ForeignKey(
|
||||
name: "fk_changes_maintainers_maintainer_id",
|
||||
column: x => x.maintainer_id,
|
||||
principalTable: "maintainers",
|
||||
principalColumn: "id");
|
||||
table.ForeignKey(
|
||||
name: "fk_changes_software_software_id",
|
||||
column: x => x.software_id,
|
||||
principalTable: "software",
|
||||
principalColumn: "id");
|
||||
table.ForeignKey(
|
||||
name: "fk_changes_syntaxes_syntax_id",
|
||||
column: x => x.syntax_id,
|
||||
principalTable: "syntaxes",
|
||||
principalColumn: "id");
|
||||
table.ForeignKey(
|
||||
name: "fk_changes_tags_tag_id",
|
||||
column: x => x.tag_id,
|
||||
principalTable: "tags",
|
||||
principalColumn: "id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_changes_filter_list_id",
|
||||
table: "changes",
|
||||
column: "filter_list_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_changes_language_id",
|
||||
table: "changes",
|
||||
column: "language_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_changes_license_id",
|
||||
table: "changes",
|
||||
column: "license_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_changes_maintainer_id",
|
||||
table: "changes",
|
||||
column: "maintainer_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_changes_software_id",
|
||||
table: "changes",
|
||||
column: "software_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_changes_syntax_id",
|
||||
table: "changes",
|
||||
column: "syntax_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_changes_tag_id",
|
||||
table: "changes",
|
||||
column: "tag_id");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "changes");
|
||||
|
||||
migrationBuilder.AlterDatabase()
|
||||
.OldAnnotation("Npgsql:Enum:aggregate_type", "filter_list,language,license,maintainer,software,syntax,tag");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,29 +0,0 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
|
||||
{
|
||||
public partial class _2696 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.UpdateData(
|
||||
table: "filter_lists",
|
||||
keyColumn: "id",
|
||||
keyValue: 2520L,
|
||||
columns: new[] { "description", "name" },
|
||||
values: new object[] { "Medium mode for uBlock Origin when blocking 3p-frames and 3p-scripts", "Dynamic rules for uBo's medium mode" });
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.UpdateData(
|
||||
table: "filter_lists",
|
||||
keyColumn: "id",
|
||||
keyValue: 2520L,
|
||||
columns: new[] { "description", "name" },
|
||||
values: new object[] { "Dynamic rules for uBlock Origin for 3p-frame unblocking only", "Dynamic rules (uBo)" });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,106 +0,0 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
|
||||
{
|
||||
public partial class _2700 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.InsertData(
|
||||
table: "filter_list_view_urls",
|
||||
columns: new[] { "id", "filter_list_id", "primariness", "url" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ 2798L, 2471L, (short)3, "https://combinatronics.io/BPower0036/AdBlockFilters/main/easydutch.txt" },
|
||||
{ 2799L, 2471L, (short)4, "https://cdn.statically.io/gh/BPower0036/AdBlockFilters/main/easydutch.txt" },
|
||||
{ 2800L, 2471L, (short)5, "https://cdn.statically.io/gl/BPower0036/AdBlockFilters/main/easydutch.txt" },
|
||||
{ 2801L, 2471L, (short)6, "https://cdn.jsdelivr.net/gh/BPower0036/AdBlockFilters@main/easydutch.txt" },
|
||||
{ 2802L, 2520L, (short)2, "https://gitlab.com/BPower0036/AdBlockFilters/-/raw/main/dynamic rules" },
|
||||
{ 2803L, 2520L, (short)3, "https://combinatronics.io/BPower0036/AdBlockfilters/main/dynamic rules" },
|
||||
{ 2804L, 2520L, (short)4, "https://cdn.statically.io/gh/BPower0036/AdBlockfilters/main/dynamic rules" },
|
||||
{ 2805L, 2520L, (short)5, "https://cdn.statically.io/gl/BPower0036/AdBlockFilters/main/dynamic rules" },
|
||||
{ 2806L, 2520L, (short)6, "https://cdn.jsdelivr.net/gh/BPower0036/AdBlockfilters@main/dynamic rules" },
|
||||
{ 2807L, 2521L, (short)2, "https://gitlab.com/BPower0036/AdBlockFilters/-/raw/main/my filters" },
|
||||
{ 2808L, 2521L, (short)3, "https://combinatronics.io/BPower0036/AdBlockfilters/main/my filters" },
|
||||
{ 2809L, 2521L, (short)4, "https://cdn.statically.io/gh/BPower0036/AdBlockfilters/main/my filters" },
|
||||
{ 2810L, 2521L, (short)5, "https://cdn.statically.io/gl/BPower0036/AdBlockFilters/main/my filters" },
|
||||
{ 2811L, 2521L, (short)6, "https://cdn.jsdelivr.net/gh/BPower0036/AdBlockfilters@main/my filters" }
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2798L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2799L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2800L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2801L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2802L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2803L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2804L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2805L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2806L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2807L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2808L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2809L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2810L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2811L);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,7 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using System.Text.Json;
|
||||
using FilterLists.Directory.Domain.Aggregates;
|
||||
using FilterLists.Directory.Infrastructure.Persistence.Queries.Context;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
|
|
@ -11,7 +14,7 @@
|
|||
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
|
||||
{
|
||||
[DbContext(typeof(QueryDbContext))]
|
||||
[Migration("20211126172625_Initial")]
|
||||
[Migration("20211205104001_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
|
|
@ -21,8 +24,107 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
.HasAnnotation("ProductVersion", "6.0.0")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "aggregate_type", new[] { "filter_list", "language", "license", "maintainer", "software", "syntax", "tag" });
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Change", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||||
|
||||
b.Property<JsonDocument>("After")
|
||||
.HasColumnType("jsonb")
|
||||
.HasColumnName("after");
|
||||
|
||||
b.Property<AggregateType>("AggregateType")
|
||||
.HasColumnType("aggregate_type")
|
||||
.HasColumnName("aggregate_type");
|
||||
|
||||
b.Property<DateTime?>("ApprovedAt")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("approved_at");
|
||||
|
||||
b.Property<JsonDocument>("Before")
|
||||
.HasColumnType("jsonb")
|
||||
.HasColumnName("before");
|
||||
|
||||
b.Property<long?>("FilterListId")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("filter_list_id");
|
||||
|
||||
b.Property<long?>("LanguageId")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("language_id");
|
||||
|
||||
b.Property<long?>("LicenseId")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("license_id");
|
||||
|
||||
b.Property<long?>("MaintainerId")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("maintainer_id");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("reason");
|
||||
|
||||
b.Property<DateTime?>("RejectedAt")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("rejected_at");
|
||||
|
||||
b.Property<string>("RejectedReason")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("rejected_reason");
|
||||
|
||||
b.Property<long?>("SoftwareId")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("software_id");
|
||||
|
||||
b.Property<DateTime>("SubmittedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("submitted_at")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP");
|
||||
|
||||
b.Property<long?>("SyntaxId")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("syntax_id");
|
||||
|
||||
b.Property<long?>("TagId")
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("tag_id");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_changes");
|
||||
|
||||
b.HasIndex("FilterListId")
|
||||
.HasDatabaseName("ix_changes_filter_list_id");
|
||||
|
||||
b.HasIndex("LanguageId")
|
||||
.HasDatabaseName("ix_changes_language_id");
|
||||
|
||||
b.HasIndex("LicenseId")
|
||||
.HasDatabaseName("ix_changes_license_id");
|
||||
|
||||
b.HasIndex("MaintainerId")
|
||||
.HasDatabaseName("ix_changes_maintainer_id");
|
||||
|
||||
b.HasIndex("SoftwareId")
|
||||
.HasDatabaseName("ix_changes_software_id");
|
||||
|
||||
b.HasIndex("SyntaxId")
|
||||
.HasDatabaseName("ix_changes_syntax_id");
|
||||
|
||||
b.HasIndex("TagId")
|
||||
.HasDatabaseName("ix_changes_tag_id");
|
||||
|
||||
b.ToTable("changes", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Dependent", b =>
|
||||
{
|
||||
b.Property<long>("DependencyFilterListId")
|
||||
|
|
@ -535,6 +637,44 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
b.ToTable("tags", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Change", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", null)
|
||||
.WithMany("Changes")
|
||||
.HasForeignKey("FilterListId")
|
||||
.HasConstraintName("fk_changes_filter_lists_filter_list_id");
|
||||
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Language", null)
|
||||
.WithMany("Changes")
|
||||
.HasForeignKey("LanguageId")
|
||||
.HasConstraintName("fk_changes_languages_language_id");
|
||||
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.License", null)
|
||||
.WithMany("Changes")
|
||||
.HasForeignKey("LicenseId")
|
||||
.HasConstraintName("fk_changes_licenses_license_id");
|
||||
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Maintainer", null)
|
||||
.WithMany("Changes")
|
||||
.HasForeignKey("MaintainerId")
|
||||
.HasConstraintName("fk_changes_maintainers_maintainer_id");
|
||||
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Software", null)
|
||||
.WithMany("Changes")
|
||||
.HasForeignKey("SoftwareId")
|
||||
.HasConstraintName("fk_changes_software_software_id");
|
||||
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Syntax", null)
|
||||
.WithMany("Changes")
|
||||
.HasForeignKey("SyntaxId")
|
||||
.HasConstraintName("fk_changes_syntaxes_syntax_id");
|
||||
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Tag", null)
|
||||
.WithMany("Changes")
|
||||
.HasForeignKey("TagId")
|
||||
.HasConstraintName("fk_changes_tags_tag_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Dependent", b =>
|
||||
{
|
||||
b.HasOne("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", "DependencyFilterList")
|
||||
|
|
@ -729,6 +869,8 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.FilterList", b =>
|
||||
{
|
||||
b.Navigation("Changes");
|
||||
|
||||
b.Navigation("DependencyFilterLists");
|
||||
|
||||
b.Navigation("DependentFilterLists");
|
||||
|
|
@ -754,26 +896,36 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Language", b =>
|
||||
{
|
||||
b.Navigation("Changes");
|
||||
|
||||
b.Navigation("FilterListLanguages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.License", b =>
|
||||
{
|
||||
b.Navigation("Changes");
|
||||
|
||||
b.Navigation("FilterLists");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Maintainer", b =>
|
||||
{
|
||||
b.Navigation("Changes");
|
||||
|
||||
b.Navigation("FilterListMaintainers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Software", b =>
|
||||
{
|
||||
b.Navigation("Changes");
|
||||
|
||||
b.Navigation("SoftwareSyntaxes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Syntax", b =>
|
||||
{
|
||||
b.Navigation("Changes");
|
||||
|
||||
b.Navigation("FilterListSyntaxes");
|
||||
|
||||
b.Navigation("SoftwareSyntaxes");
|
||||
|
|
@ -781,6 +933,8 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
||||
modelBuilder.Entity("FilterLists.Directory.Infrastructure.Persistence.Queries.Entities.Tag", b =>
|
||||
{
|
||||
b.Navigation("Changes");
|
||||
|
||||
b.Navigation("FilterListTags");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
|
|
@ -1,4 +1,7 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using System;
|
||||
using System.Text.Json;
|
||||
using FilterLists.Directory.Domain.Aggregates;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
|
@ -9,6 +12,9 @@ public partial class Initial : Migration
|
|||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterDatabase()
|
||||
.Annotation("Npgsql:Enum:aggregate_type", "filter_list,language,license,maintainer,software,syntax,tag");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "languages",
|
||||
columns: table => new
|
||||
|
|
@ -163,6 +169,68 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "changes",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
reason = table.Column<string>(type: "text", nullable: true),
|
||||
submitted_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"),
|
||||
approved_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
|
||||
rejected_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
|
||||
rejected_reason = table.Column<string>(type: "text", nullable: true),
|
||||
before = table.Column<JsonDocument>(type: "jsonb", nullable: true),
|
||||
after = table.Column<JsonDocument>(type: "jsonb", nullable: true),
|
||||
aggregate_type = table.Column<AggregateType>(type: "aggregate_type", nullable: false),
|
||||
filter_list_id = table.Column<long>(type: "bigint", nullable: true),
|
||||
language_id = table.Column<long>(type: "bigint", nullable: true),
|
||||
license_id = table.Column<long>(type: "bigint", nullable: true),
|
||||
maintainer_id = table.Column<long>(type: "bigint", nullable: true),
|
||||
software_id = table.Column<long>(type: "bigint", nullable: true),
|
||||
syntax_id = table.Column<long>(type: "bigint", nullable: true),
|
||||
tag_id = table.Column<long>(type: "bigint", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_changes", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_changes_filter_lists_filter_list_id",
|
||||
column: x => x.filter_list_id,
|
||||
principalTable: "filter_lists",
|
||||
principalColumn: "id");
|
||||
table.ForeignKey(
|
||||
name: "fk_changes_languages_language_id",
|
||||
column: x => x.language_id,
|
||||
principalTable: "languages",
|
||||
principalColumn: "id");
|
||||
table.ForeignKey(
|
||||
name: "fk_changes_licenses_license_id",
|
||||
column: x => x.license_id,
|
||||
principalTable: "licenses",
|
||||
principalColumn: "id");
|
||||
table.ForeignKey(
|
||||
name: "fk_changes_maintainers_maintainer_id",
|
||||
column: x => x.maintainer_id,
|
||||
principalTable: "maintainers",
|
||||
principalColumn: "id");
|
||||
table.ForeignKey(
|
||||
name: "fk_changes_software_software_id",
|
||||
column: x => x.software_id,
|
||||
principalTable: "software",
|
||||
principalColumn: "id");
|
||||
table.ForeignKey(
|
||||
name: "fk_changes_syntaxes_syntax_id",
|
||||
column: x => x.syntax_id,
|
||||
principalTable: "syntaxes",
|
||||
principalColumn: "id");
|
||||
table.ForeignKey(
|
||||
name: "fk_changes_tags_tag_id",
|
||||
column: x => x.tag_id,
|
||||
principalTable: "tags",
|
||||
principalColumn: "id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "dependents",
|
||||
columns: table => new
|
||||
|
|
@ -353,6 +421,41 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_changes_filter_list_id",
|
||||
table: "changes",
|
||||
column: "filter_list_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_changes_language_id",
|
||||
table: "changes",
|
||||
column: "language_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_changes_license_id",
|
||||
table: "changes",
|
||||
column: "license_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_changes_maintainer_id",
|
||||
table: "changes",
|
||||
column: "maintainer_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_changes_software_id",
|
||||
table: "changes",
|
||||
column: "software_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_changes_syntax_id",
|
||||
table: "changes",
|
||||
column: "syntax_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_changes_tag_id",
|
||||
table: "changes",
|
||||
column: "tag_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_dependents_dependent_filter_list_id",
|
||||
table: "dependents",
|
||||
|
|
@ -455,6 +558,9 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "changes");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "dependents");
|
||||
|
||||
|
|
@ -14,8 +14,8 @@
|
|||
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
|
||||
{
|
||||
[DbContext(typeof(QueryDbContext))]
|
||||
[Migration("20211203090537_2700")]
|
||||
partial class _2700
|
||||
[Migration("20211205104022_SeedData")]
|
||||
partial class SeedData
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
|
|
@ -2850,7 +2850,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
{ 2517L, null, "A blocklist of phishing websites. Based on PhishTank and OpenPhish.", null, null, null, "https://gitlab.com/curben/phishing-filter", true, "https://gitlab.com/curben/phishing-filter/issues", 8L, "phishing-filter (dnscrypt-proxy IPs)", null, null, null },
|
||||
{ 2518L, null, "A block of websites that host potentially unwanted programs", null, null, null, "https://gitlab.com/curben/pup-filter", true, "https://gitlab.com/curben/pup-filter/issues", 3L, "pup-filter (dnscrypt-proxy names)", null, null, null },
|
||||
{ 2519L, null, "A supplement for EasyList and EasyPrivacy on Dutch domains including anti-adblock", "https://www.paypal.com/donate?hosted_button_id=8BBT5V55TGVXW", null, null, "https://github.com/JohnyP36/Personal-List", true, "https://github.com/JohnyP36/Personal-List/issues", 4L, "Dutch Filter List", null, null, null },
|
||||
{ 2520L, null, "Dynamic rules for uBlock Origin for 3p-frame unblocking only", "https://www.paypal.com/donate?hosted_button_id=M4D2NPZX5NS4C", null, null, "https://github.com/BPower0036/AdBlockFilters/", true, "https://github.com/BPower0036/AdBlockFilters/issues", 4L, "Dynamic rules (uBo)", null, null, null },
|
||||
{ 2520L, null, "Medium mode for uBlock Origin when blocking 3p-frames and 3p-scripts", "https://www.paypal.com/donate?hosted_button_id=M4D2NPZX5NS4C", null, null, "https://github.com/BPower0036/AdBlockFilters/", true, "https://github.com/BPower0036/AdBlockFilters/issues", 4L, "Dynamic rules for uBo's medium mode", null, null, null },
|
||||
{ 2521L, null, "Personal filter list (My filters)", "https://www.paypal.com/donate?hosted_button_id=M4D2NPZX5NS4C", null, null, "https://github.com/BPower0036/AdBlockFilters/", true, "https://github.com/BPower0036/AdBlockFilters/issues", 4L, "Personal filter list (My filters) (uBo)", null, null, null },
|
||||
{ 2522L, null, null, null, null, null, "https://git.bubblev.org/bubblev/bubble-filter-lists/", true, null, 5L, "Bubble Filter Lists - Ads and Trackers", null, null, null },
|
||||
{ 2523L, null, null, null, null, null, "https://git.bubblev.org/bubblev/bubble-filter-lists/", true, null, 5L, "Bubble Filter Lists - US News", null, null, null },
|
||||
|
|
@ -13602,7 +13602,21 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
{ 2794L, 2565L, (short)2, "https://cdn.jsdelivr.net/gh/FiltersHeroes/PCCassets@main/euCDB.txt" },
|
||||
{ 2795L, 2565L, (short)3, "https://combinatronics.io/FiltersHeroes/PCCassets/main/euCDB.txt" },
|
||||
{ 2796L, 2565L, (short)4, "https://cdn.statically.io/gh/FiltersHeroes/PCCassets/main/euCDB.txt" },
|
||||
{ 2797L, 2565L, (short)5, "https://filtersheroes.gitlab.io/AssetsMirror/euCDB.txt" }
|
||||
{ 2797L, 2565L, (short)5, "https://filtersheroes.gitlab.io/AssetsMirror/euCDB.txt" },
|
||||
{ 2798L, 2471L, (short)3, "https://combinatronics.io/BPower0036/AdBlockFilters/main/easydutch.txt" },
|
||||
{ 2799L, 2471L, (short)4, "https://cdn.statically.io/gh/BPower0036/AdBlockFilters/main/easydutch.txt" },
|
||||
{ 2800L, 2471L, (short)5, "https://cdn.statically.io/gl/BPower0036/AdBlockFilters/main/easydutch.txt" },
|
||||
{ 2801L, 2471L, (short)6, "https://cdn.jsdelivr.net/gh/BPower0036/AdBlockFilters@main/easydutch.txt" },
|
||||
{ 2802L, 2520L, (short)2, "https://gitlab.com/BPower0036/AdBlockFilters/-/raw/main/dynamic rules" },
|
||||
{ 2803L, 2520L, (short)3, "https://combinatronics.io/BPower0036/AdBlockfilters/main/dynamic rules" },
|
||||
{ 2804L, 2520L, (short)4, "https://cdn.statically.io/gh/BPower0036/AdBlockfilters/main/dynamic rules" },
|
||||
{ 2805L, 2520L, (short)5, "https://cdn.statically.io/gl/BPower0036/AdBlockFilters/main/dynamic rules" },
|
||||
{ 2806L, 2520L, (short)6, "https://cdn.jsdelivr.net/gh/BPower0036/AdBlockfilters@main/dynamic rules" },
|
||||
{ 2807L, 2521L, (short)2, "https://gitlab.com/BPower0036/AdBlockFilters/-/raw/main/my filters" },
|
||||
{ 2808L, 2521L, (short)3, "https://combinatronics.io/BPower0036/AdBlockfilters/main/my filters" },
|
||||
{ 2809L, 2521L, (short)4, "https://cdn.statically.io/gh/BPower0036/AdBlockfilters/main/my filters" },
|
||||
{ 2810L, 2521L, (short)5, "https://cdn.statically.io/gl/BPower0036/AdBlockFilters/main/my filters" },
|
||||
{ 2811L, 2521L, (short)6, "https://cdn.jsdelivr.net/gh/BPower0036/AdBlockfilters@main/my filters" }
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
|
|
@ -65535,6 +65549,76 @@ protected override void Down(MigrationBuilder migrationBuilder)
|
|||
keyColumn: "id",
|
||||
keyValue: 2797L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2798L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2799L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2800L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2801L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2802L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2803L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2804L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2805L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2806L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2807L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2808L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2809L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2810L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_list_view_urls",
|
||||
keyColumn: "id",
|
||||
keyValue: 2811L);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "filter_lists",
|
||||
keyColumn: "id",
|
||||
Loading…
Reference in a new issue