From 83aa77f7ddd4bdff0c11045d8de68e68c5a3fe04 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Sun, 15 Oct 2017 19:02:15 -0500 Subject: [PATCH] resharper cleanup --- .../Migrations/20170410220415_Initial.cs | 14 +-- .../Migrations/20170625164836_AddAuthor.cs | 43 ++++---- .../20170625223511_addTableCsvEntity.cs | 14 +-- .../FilterListsDbContextModelSnapshot.cs | 102 +++++++++--------- 4 files changed, 81 insertions(+), 92 deletions(-) diff --git a/src/FilterLists.Data/Migrations/20170410220415_Initial.cs b/src/FilterLists.Data/Migrations/20170410220415_Initial.cs index 83b0f5813..77a13a8e8 100644 --- a/src/FilterLists.Data/Migrations/20170410220415_Initial.cs +++ b/src/FilterLists.Data/Migrations/20170410220415_Initial.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using Microsoft.EntityFrameworkCore.Migrations; namespace FilterLists.Data.Migrations @@ -9,8 +8,8 @@ public partial class Initial : Migration protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( - name: "List", - columns: table => new + "List", + table => new { Id = table.Column(nullable: false) .Annotation("MySQL:AutoIncrement", true), @@ -26,16 +25,13 @@ protected override void Up(MigrationBuilder migrationBuilder) Name = table.Column(maxLength: 64, nullable: true), ViewUrl = table.Column(maxLength: 2083, nullable: false) }, - constraints: table => - { - table.PrimaryKey("PK_List", x => x.Id); - }); + constraints: table => { table.PrimaryKey("PK_List", x => x.Id); }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( - name: "List"); + "List"); } } -} +} \ No newline at end of file diff --git a/src/FilterLists.Data/Migrations/20170625164836_AddAuthor.cs b/src/FilterLists.Data/Migrations/20170625164836_AddAuthor.cs index 998766816..bdb07dc7d 100644 --- a/src/FilterLists.Data/Migrations/20170625164836_AddAuthor.cs +++ b/src/FilterLists.Data/Migrations/20170625164836_AddAuthor.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using Microsoft.EntityFrameworkCore.Migrations; namespace FilterLists.Data.Migrations @@ -9,8 +8,8 @@ public partial class AddAuthor : Migration protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( - name: "Name", - table: "List", + "Name", + "List", maxLength: 126, nullable: true, oldClrType: typeof(string), @@ -18,14 +17,14 @@ protected override void Up(MigrationBuilder migrationBuilder) oldNullable: true); migrationBuilder.AlterColumn( - name: "ModifiedDateUtc", - table: "List", + "ModifiedDateUtc", + "List", nullable: true, oldClrType: typeof(DateTime)); migrationBuilder.AlterColumn( - name: "Email", - table: "List", + "Email", + "List", maxLength: 126, nullable: true, oldClrType: typeof(string), @@ -33,8 +32,8 @@ protected override void Up(MigrationBuilder migrationBuilder) oldNullable: true); migrationBuilder.AlterColumn( - name: "Description", - table: "List", + "Description", + "List", maxLength: 1022, nullable: true, oldClrType: typeof(string), @@ -42,8 +41,8 @@ protected override void Up(MigrationBuilder migrationBuilder) oldNullable: true); migrationBuilder.AddColumn( - name: "Author", - table: "List", + "Author", + "List", maxLength: 126, nullable: true); } @@ -51,12 +50,12 @@ protected override void Up(MigrationBuilder migrationBuilder) protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( - name: "Author", - table: "List"); + "Author", + "List"); migrationBuilder.AlterColumn( - name: "Name", - table: "List", + "Name", + "List", maxLength: 64, nullable: true, oldClrType: typeof(string), @@ -64,15 +63,15 @@ protected override void Down(MigrationBuilder migrationBuilder) oldNullable: true); migrationBuilder.AlterColumn( - name: "ModifiedDateUtc", - table: "List", + "ModifiedDateUtc", + "List", nullable: false, oldClrType: typeof(DateTime), oldNullable: true); migrationBuilder.AlterColumn( - name: "Email", - table: "List", + "Email", + "List", maxLength: 254, nullable: true, oldClrType: typeof(string), @@ -80,8 +79,8 @@ protected override void Down(MigrationBuilder migrationBuilder) oldNullable: true); migrationBuilder.AlterColumn( - name: "Description", - table: "List", + "Description", + "List", maxLength: 512, nullable: true, oldClrType: typeof(string), @@ -89,4 +88,4 @@ protected override void Down(MigrationBuilder migrationBuilder) oldNullable: true); } } -} +} \ No newline at end of file diff --git a/src/FilterLists.Data/Migrations/20170625223511_addTableCsvEntity.cs b/src/FilterLists.Data/Migrations/20170625223511_addTableCsvEntity.cs index 24ef7047b..f1d316260 100644 --- a/src/FilterLists.Data/Migrations/20170625223511_addTableCsvEntity.cs +++ b/src/FilterLists.Data/Migrations/20170625223511_addTableCsvEntity.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using Microsoft.EntityFrameworkCore.Migrations; namespace FilterLists.Data.Migrations @@ -9,8 +8,8 @@ public partial class addTableCsvEntity : Migration protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( - name: "TableCsv", - columns: table => new + "TableCsv", + table => new { Id = table.Column(nullable: false) .Annotation("MySQL:AutoIncrement", true), @@ -19,16 +18,13 @@ protected override void Up(MigrationBuilder migrationBuilder) Name = table.Column(maxLength: 126, nullable: false), Url = table.Column(maxLength: 2083, nullable: false) }, - constraints: table => - { - table.PrimaryKey("PK_TableCsv", x => x.Id); - }); + constraints: table => { table.PrimaryKey("PK_TableCsv", x => x.Id); }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( - name: "TableCsv"); + "TableCsv"); } } -} +} \ No newline at end of file diff --git a/src/FilterLists.Data/Migrations/FilterListsDbContextModelSnapshot.cs b/src/FilterLists.Data/Migrations/FilterListsDbContextModelSnapshot.cs index d22334391..7f22f7d8c 100644 --- a/src/FilterLists.Data/Migrations/FilterListsDbContextModelSnapshot.cs +++ b/src/FilterLists.Data/Migrations/FilterListsDbContextModelSnapshot.cs @@ -1,14 +1,12 @@ using System; +using FilterLists.Data.Contexts; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using FilterLists.Data.Contexts; namespace FilterLists.Data.Migrations { [DbContext(typeof(FilterListsDbContext))] - partial class FilterListsDbContextModelSnapshot : ModelSnapshot + internal class FilterListsDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { @@ -16,75 +14,75 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasAnnotation("ProductVersion", "1.1.2"); modelBuilder.Entity("FilterLists.Data.Models.List", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); + { + b.Property("Id") + .ValueGeneratedOnAdd(); - b.Property("AddedDateUtc") - .ValueGeneratedOnAdd(); + b.Property("AddedDateUtc") + .ValueGeneratedOnAdd(); - b.Property("Author") - .HasMaxLength(126); + b.Property("Author") + .HasMaxLength(126); - b.Property("Description") - .HasMaxLength(1022); + b.Property("Description") + .HasMaxLength(1022); - b.Property("DescriptionSourceUrl") - .HasMaxLength(2083); + b.Property("DescriptionSourceUrl") + .HasMaxLength(2083); - b.Property("DonateUrl") - .HasMaxLength(2083); + b.Property("DonateUrl") + .HasMaxLength(2083); - b.Property("Email") - .HasMaxLength(126); + b.Property("Email") + .HasMaxLength(126); - b.Property("ForumUrl") - .HasMaxLength(2083); + b.Property("ForumUrl") + .HasMaxLength(2083); - b.Property("HomeUrl") - .HasMaxLength(2083); + b.Property("HomeUrl") + .HasMaxLength(2083); - b.Property("IssuesUrl") - .HasMaxLength(2083); + b.Property("IssuesUrl") + .HasMaxLength(2083); - b.Property("ModifiedDateUtc") - .ValueGeneratedOnAddOrUpdate(); + b.Property("ModifiedDateUtc") + .ValueGeneratedOnAddOrUpdate(); - b.Property("Name") - .HasMaxLength(126); + b.Property("Name") + .HasMaxLength(126); - b.Property("ViewUrl") - .IsRequired() - .HasMaxLength(2083); + b.Property("ViewUrl") + .IsRequired() + .HasMaxLength(2083); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("List"); - }); + b.ToTable("List"); + }); modelBuilder.Entity("FilterLists.Data.Models.TableCsv", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); + { + b.Property("Id") + .ValueGeneratedOnAdd(); - b.Property("AddedDateUtc") - .ValueGeneratedOnAdd(); + b.Property("AddedDateUtc") + .ValueGeneratedOnAdd(); - b.Property("ModifiedDateUtc") - .ValueGeneratedOnAddOrUpdate(); + b.Property("ModifiedDateUtc") + .ValueGeneratedOnAddOrUpdate(); - b.Property("Name") - .IsRequired() - .HasMaxLength(126); + b.Property("Name") + .IsRequired() + .HasMaxLength(126); - b.Property("Url") - .IsRequired() - .HasMaxLength(2083); + b.Property("Url") + .IsRequired() + .HasMaxLength(2083); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("TableCsv"); - }); + b.ToTable("TableCsv"); + }); } } -} +} \ No newline at end of file