diff --git a/src/FilterLists.Api/Migrations/20171101015403_add Submission URL, modify License bool names.Designer.cs b/src/FilterLists.Api/Migrations/20171101015403_add Submission URL, modify License bool names.Designer.cs
new file mode 100644
index 000000000..dfe7e98aa
--- /dev/null
+++ b/src/FilterLists.Api/Migrations/20171101015403_add Submission URL, modify License bool names.Designer.cs
@@ -0,0 +1,343 @@
+//
+using FilterLists.Data;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage;
+using Microsoft.EntityFrameworkCore.Storage.Internal;
+using System;
+
+namespace FilterLists.Api.Migrations
+{
+ [DbContext(typeof(FilterListsDbContext))]
+ [Migration("20171101015403_add Submission URL, modify License bool names")]
+ partial class addSubmissionURLmodifyLicenseboolnames
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
+ .HasAnnotation("ProductVersion", "2.0.0-rtm-26452");
+
+ modelBuilder.Entity("FilterLists.Data.Entities.FilterList", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("CreatedDateUtc")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TIMESTAMP");
+
+ b.Property("Description")
+ .HasMaxLength(4096);
+
+ b.Property("DescriptionSourceUrl")
+ .HasMaxLength(2083);
+
+ b.Property("DonateUrl")
+ .HasMaxLength(2083);
+
+ b.Property("EmailAddress")
+ .HasMaxLength(126);
+
+ b.Property("ForumUrl")
+ .HasMaxLength(2083);
+
+ b.Property("HomeUrl")
+ .HasMaxLength(2083);
+
+ b.Property("IssuesUrl")
+ .HasMaxLength(2083);
+
+ b.Property("LicenseId");
+
+ b.Property("MaintainerId");
+
+ b.Property("ModifiedDateUtc")
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("TIMESTAMP");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(126);
+
+ b.Property("SubmissionUrl")
+ .HasMaxLength(2083);
+
+ b.Property("ViewUrl")
+ .HasMaxLength(2083);
+
+ b.HasKey("Id");
+
+ b.HasIndex("LicenseId");
+
+ b.HasIndex("MaintainerId");
+
+ b.ToTable("filterlists");
+ });
+
+ modelBuilder.Entity("FilterLists.Data.Entities.FilterListLanguage", b =>
+ {
+ b.Property("FilterListId");
+
+ b.Property("LanguageId");
+
+ b.Property("CreatedDateUtc")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TIMESTAMP");
+
+ b.Property("ModifiedDateUtc")
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("TIMESTAMP");
+
+ b.HasKey("FilterListId", "LanguageId");
+
+ b.HasIndex("LanguageId");
+
+ b.ToTable("filterlists_languages");
+ });
+
+ modelBuilder.Entity("FilterLists.Data.Entities.FilterListRule", b =>
+ {
+ b.Property("FilterListId");
+
+ b.Property("RuleId");
+
+ b.Property("CreatedDateUtc")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TIMESTAMP");
+
+ b.Property("ModifiedDateUtc")
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("TIMESTAMP");
+
+ b.HasKey("FilterListId", "RuleId");
+
+ b.HasIndex("RuleId");
+
+ b.ToTable("filterlists_rules");
+ });
+
+ modelBuilder.Entity("FilterLists.Data.Entities.FilterListSoftware", b =>
+ {
+ b.Property("FilterListId");
+
+ b.Property("SoftwareId");
+
+ b.Property("CreatedDateUtc")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TIMESTAMP");
+
+ b.Property("ModifiedDateUtc")
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("TIMESTAMP");
+
+ b.HasKey("FilterListId", "SoftwareId");
+
+ b.HasIndex("SoftwareId");
+
+ b.ToTable("filterlists_software");
+ });
+
+ modelBuilder.Entity("FilterLists.Data.Entities.Language", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("CreatedDateUtc")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TIMESTAMP");
+
+ b.Property("Iso6391")
+ .HasMaxLength(2);
+
+ b.Property("Iso6392")
+ .HasMaxLength(3);
+
+ b.Property("Iso6392B")
+ .HasMaxLength(3);
+
+ b.Property("Iso6392T")
+ .HasMaxLength(3);
+
+ b.Property("Iso6393")
+ .HasMaxLength(3);
+
+ b.Property("LocalName")
+ .HasMaxLength(126);
+
+ b.Property("ModifiedDateUtc")
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("TIMESTAMP");
+
+ b.Property("Name")
+ .HasMaxLength(126);
+
+ b.HasKey("Id");
+
+ b.ToTable("languages");
+ });
+
+ modelBuilder.Entity("FilterLists.Data.Entities.License", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("CreatedDateUtc")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TIMESTAMP");
+
+ b.Property("DescriptionUrl")
+ .HasMaxLength(2083);
+
+ b.Property("ModifiedDateUtc")
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("TIMESTAMP");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(126);
+
+ b.Property("PermissiveAdaptation");
+
+ b.Property("PermissiveCommercial");
+
+ b.HasKey("Id");
+
+ b.ToTable("licenses");
+ });
+
+ modelBuilder.Entity("FilterLists.Data.Entities.Maintainer", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("CreatedDateUtc")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TIMESTAMP");
+
+ b.Property("EmailAddress")
+ .HasMaxLength(126);
+
+ b.Property("HomeUrl")
+ .HasMaxLength(2083);
+
+ b.Property("ModifiedDateUtc")
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("TIMESTAMP");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(126);
+
+ b.Property("TwitterHandle")
+ .HasMaxLength(126);
+
+ b.HasKey("Id");
+
+ b.ToTable("maintainers");
+ });
+
+ modelBuilder.Entity("FilterLists.Data.Entities.Rule", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("CreatedDateUtc")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TIMESTAMP");
+
+ b.Property("ModifiedDateUtc")
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("TIMESTAMP");
+
+ b.Property("Raw")
+ .HasMaxLength(2083);
+
+ b.HasKey("Id");
+
+ b.ToTable("rules");
+ });
+
+ modelBuilder.Entity("FilterLists.Data.Entities.Software", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("CreatedDateUtc")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TIMESTAMP");
+
+ b.Property("DownloadUrl")
+ .HasMaxLength(2083);
+
+ b.Property("HomeUrl")
+ .HasMaxLength(2083);
+
+ b.Property("ModifiedDateUtc")
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("TIMESTAMP");
+
+ b.Property("Name")
+ .HasMaxLength(126);
+
+ b.HasKey("Id");
+
+ b.ToTable("software");
+ });
+
+ modelBuilder.Entity("FilterLists.Data.Entities.FilterList", b =>
+ {
+ b.HasOne("FilterLists.Data.Entities.License")
+ .WithMany("FilterLists")
+ .HasForeignKey("LicenseId");
+
+ b.HasOne("FilterLists.Data.Entities.Maintainer")
+ .WithMany("FilterLists")
+ .HasForeignKey("MaintainerId");
+ });
+
+ modelBuilder.Entity("FilterLists.Data.Entities.FilterListLanguage", b =>
+ {
+ b.HasOne("FilterLists.Data.Entities.FilterList", "FilterList")
+ .WithMany("FilterListLanguages")
+ .HasForeignKey("FilterListId")
+ .OnDelete(DeleteBehavior.Cascade);
+
+ b.HasOne("FilterLists.Data.Entities.Language", "Language")
+ .WithMany("FilterListLanguages")
+ .HasForeignKey("LanguageId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
+
+ modelBuilder.Entity("FilterLists.Data.Entities.FilterListRule", b =>
+ {
+ b.HasOne("FilterLists.Data.Entities.FilterList", "FilterList")
+ .WithMany("FilterListRules")
+ .HasForeignKey("FilterListId")
+ .OnDelete(DeleteBehavior.Cascade);
+
+ b.HasOne("FilterLists.Data.Entities.Rule", "Rule")
+ .WithMany("FilterListRules")
+ .HasForeignKey("RuleId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
+
+ modelBuilder.Entity("FilterLists.Data.Entities.FilterListSoftware", b =>
+ {
+ b.HasOne("FilterLists.Data.Entities.FilterList", "FilterList")
+ .WithMany("FilterListSoftware")
+ .HasForeignKey("FilterListId")
+ .OnDelete(DeleteBehavior.Cascade);
+
+ b.HasOne("FilterLists.Data.Entities.Software", "Software")
+ .WithMany("FilterListSoftware")
+ .HasForeignKey("SoftwareId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/src/FilterLists.Api/Migrations/20171101015403_add Submission URL, modify License bool names.cs b/src/FilterLists.Api/Migrations/20171101015403_add Submission URL, modify License bool names.cs
new file mode 100644
index 000000000..e466db9dc
--- /dev/null
+++ b/src/FilterLists.Api/Migrations/20171101015403_add Submission URL, modify License bool names.cs
@@ -0,0 +1,68 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+using System;
+using System.Collections.Generic;
+
+namespace FilterLists.Api.Migrations
+{
+ public partial class addSubmissionURLmodifyLicenseboolnames : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropColumn(
+ name: "PermissiveRedistribution",
+ table: "licenses");
+
+ migrationBuilder.DropColumn(
+ name: "PermissiveUsage",
+ table: "licenses");
+
+ migrationBuilder.AddColumn(
+ name: "PermissiveAdaptation",
+ table: "licenses",
+ type: "bit",
+ nullable: false,
+ defaultValue: false);
+
+ migrationBuilder.AddColumn(
+ name: "PermissiveCommercial",
+ table: "licenses",
+ type: "bit",
+ nullable: false,
+ defaultValue: false);
+
+ migrationBuilder.AddColumn(
+ name: "SubmissionUrl",
+ table: "filterlists",
+ type: "varchar(2083)",
+ maxLength: 2083,
+ nullable: true);
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropColumn(
+ name: "PermissiveAdaptation",
+ table: "licenses");
+
+ migrationBuilder.DropColumn(
+ name: "PermissiveCommercial",
+ table: "licenses");
+
+ migrationBuilder.DropColumn(
+ name: "SubmissionUrl",
+ table: "filterlists");
+
+ migrationBuilder.AddColumn(
+ name: "PermissiveRedistribution",
+ table: "licenses",
+ nullable: false,
+ defaultValue: false);
+
+ migrationBuilder.AddColumn(
+ name: "PermissiveUsage",
+ table: "licenses",
+ nullable: false,
+ defaultValue: false);
+ }
+ }
+}
diff --git a/src/FilterLists.Api/Migrations/FilterListsDbContextModelSnapshot.cs b/src/FilterLists.Api/Migrations/FilterListsDbContextModelSnapshot.cs
index cda38db41..d90fc1ae0 100644
--- a/src/FilterLists.Api/Migrations/FilterListsDbContextModelSnapshot.cs
+++ b/src/FilterLists.Api/Migrations/FilterListsDbContextModelSnapshot.cs
@@ -62,6 +62,9 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.IsRequired()
.HasMaxLength(126);
+ b.Property("SubmissionUrl")
+ .HasMaxLength(2083);
+
b.Property("ViewUrl")
.HasMaxLength(2083);
@@ -196,9 +199,9 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.IsRequired()
.HasMaxLength(126);
- b.Property("PermissiveRedistribution");
+ b.Property("PermissiveAdaptation");
- b.Property("PermissiveUsage");
+ b.Property("PermissiveCommercial");
b.HasKey("Id");
diff --git a/src/FilterLists.Data/Entities/FilterList.cs b/src/FilterLists.Data/Entities/FilterList.cs
index 7664dc43b..c0f9e97df 100644
--- a/src/FilterLists.Data/Entities/FilterList.cs
+++ b/src/FilterLists.Data/Entities/FilterList.cs
@@ -17,6 +17,7 @@ public class FilterList : BaseEntity
public int? LicenseId { get; set; }
public int? MaintainerId { get; set; }
public string Name { get; set; }
+ public string SubmissionUrl { get; set; }
public string ViewUrl { get; set; }
}
}
\ No newline at end of file
diff --git a/src/FilterLists.Data/Entities/License.cs b/src/FilterLists.Data/Entities/License.cs
index 95ae9e8b9..fecc22fce 100644
--- a/src/FilterLists.Data/Entities/License.cs
+++ b/src/FilterLists.Data/Entities/License.cs
@@ -7,7 +7,7 @@ public class License : BaseEntity
public string DescriptionUrl { get; set; }
public ICollection FilterLists { get; set; }
public string Name { get; set; }
- public bool PermissiveRedistribution { get; set; }
- public bool PermissiveUsage { get; set; }
+ public bool PermissiveAdaptation { get; set; }
+ public bool PermissiveCommercial { get; set; }
}
}
\ No newline at end of file
diff --git a/src/FilterLists.Data/EntityTypeConfigurations/FilterListTypeConfiguration.cs b/src/FilterLists.Data/EntityTypeConfigurations/FilterListTypeConfiguration.cs
index 11eea731f..ba1fa7bea 100644
--- a/src/FilterLists.Data/EntityTypeConfigurations/FilterListTypeConfiguration.cs
+++ b/src/FilterLists.Data/EntityTypeConfigurations/FilterListTypeConfiguration.cs
@@ -26,6 +26,8 @@ public override void Configure(EntityTypeBuilder entityTypeBuilder)
entityTypeBuilder.Property(b => b.Name)
.IsRequired()
.HasMaxLength(126);
+ entityTypeBuilder.Property(b => b.SubmissionUrl)
+ .HasMaxLength(2083);
entityTypeBuilder.Property(b => b.ViewUrl)
.HasMaxLength(2083);
base.Configure(entityTypeBuilder);