From e873100f0b144e3c547cbda870224f73909c2219 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Wed, 14 Nov 2018 10:02:28 +0300 Subject: [PATCH] Update EF Core migration --- ....cs => 20181114070127_Initial.Designer.cs} | 69 +++++++++++++++++-- ...l_Modules.cs => 20181114070127_Initial.cs} | 41 +++++++++-- .../MyProjectNameDbContextModelSnapshot.cs | 65 ++++++++++++++++- ...e.MyProjectName.EntityFrameworkCore.csproj | 6 -- 4 files changed, 165 insertions(+), 16 deletions(-) rename templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/{20180917104042_Initial_Modules.Designer.cs => 20181114070127_Initial.Designer.cs} (91%) rename templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/{20180917104042_Initial_Modules.cs => 20181114070127_Initial.cs} (91%) diff --git a/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20180917104042_Initial_Modules.Designer.cs b/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20181114070127_Initial.Designer.cs similarity index 91% rename from templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20180917104042_Initial_Modules.Designer.cs rename to templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20181114070127_Initial.Designer.cs index 4d945a9667..9abe09e5c4 100644 --- a/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20180917104042_Initial_Modules.Designer.cs +++ b/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20181114070127_Initial.Designer.cs @@ -11,8 +11,8 @@ using Volo.Abp.BackgroundJobs; namespace MyCompanyName.MyProjectName.Migrations { [DbContext(typeof(MyProjectNameDbContext))] - [Migration("20180917104042_Initial_Modules")] - partial class Initial_Modules + [Migration("20181114070127_Initial")] + partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) { @@ -255,6 +255,35 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("AbpBackgroundJobs"); }); + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Description") + .HasMaxLength(256); + + b.Property("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256); + + b.Property("Regex") + .HasMaxLength(512); + + b.Property("RegexDescription") + .HasMaxLength(128); + + b.Property("Required"); + + b.Property("ValueType"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes"); + }); + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => { b.Property("Id") @@ -262,6 +291,15 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp"); + b.Property("IsDefault") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnName("IsStatic"); + b.Property("Name") .IsRequired() .HasMaxLength(256); @@ -317,6 +355,14 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnName("ConcurrencyStamp") .HasMaxLength(256); + b.Property("CreationTime"); + + b.Property("CreatorId"); + + b.Property("DeleterId"); + + b.Property("DeletionTime"); + b.Property("Email") .HasColumnName("Email") .HasMaxLength(256); @@ -329,6 +375,12 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ExtraProperties") .HasColumnName("ExtraProperties"); + b.Property("IsDeleted"); + + b.Property("LastModificationTime"); + + b.Property("LastModifierId"); + b.Property("LockoutEnabled") .ValueGeneratedOnAdd() .HasColumnName("LockoutEnabled") @@ -336,6 +388,10 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("LockoutEnd"); + b.Property("Name") + .HasColumnName("Name") + .HasMaxLength(64); + b.Property("NormalizedEmail") .HasColumnName("NormalizedEmail") .HasMaxLength(256); @@ -363,6 +419,10 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnName("SecurityStamp") .HasMaxLength(256); + b.Property("Surname") + .HasColumnName("Surname") + .HasMaxLength(64); + b.Property("TenantId") .HasColumnName("TenantId"); @@ -455,9 +515,10 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("UserId"); b.Property("LoginProvider") - .HasMaxLength(128); + .HasMaxLength(64); - b.Property("Name"); + b.Property("Name") + .HasMaxLength(128); b.Property("TenantId"); diff --git a/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20180917104042_Initial_Modules.cs b/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20181114070127_Initial.cs similarity index 91% rename from templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20180917104042_Initial_Modules.cs rename to templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20181114070127_Initial.cs index f885ae08cb..01f4f9cd7f 100644 --- a/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20180917104042_Initial_Modules.cs +++ b/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20181114070127_Initial.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations; namespace MyCompanyName.MyProjectName.Migrations { - public partial class Initial_Modules : Migration + public partial class Initial : Migration { protected override void Up(MigrationBuilder migrationBuilder) { @@ -53,6 +53,24 @@ namespace MyCompanyName.MyProjectName.Migrations table.PrimaryKey("PK_AbpBackgroundJobs", x => x.Id); }); + migrationBuilder.CreateTable( + name: "AbpClaimTypes", + columns: table => new + { + Id = table.Column(nullable: false), + Name = table.Column(maxLength: 256, nullable: false), + Required = table.Column(nullable: false), + IsStatic = table.Column(nullable: false), + Regex = table.Column(maxLength: 512, nullable: true), + RegexDescription = table.Column(maxLength: 128, nullable: true), + Description = table.Column(maxLength: 256, nullable: true), + ValueType = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); + }); + migrationBuilder.CreateTable( name: "AbpPermissionGrants", columns: table => new @@ -76,7 +94,10 @@ namespace MyCompanyName.MyProjectName.Migrations TenantId = table.Column(nullable: true), Name = table.Column(maxLength: 256, nullable: false), NormalizedName = table.Column(maxLength: 256, nullable: false), - ConcurrencyStamp = table.Column(nullable: true) + ConcurrencyStamp = table.Column(nullable: true), + IsDefault = table.Column(nullable: false), + IsStatic = table.Column(nullable: false), + IsPublic = table.Column(nullable: false) }, constraints: table => { @@ -103,9 +124,18 @@ namespace MyCompanyName.MyProjectName.Migrations columns: table => new { Id = table.Column(nullable: false), + CreationTime = table.Column(nullable: false), + CreatorId = table.Column(nullable: true), + LastModificationTime = table.Column(nullable: true), + LastModifierId = table.Column(nullable: true), + IsDeleted = table.Column(nullable: false), + DeleterId = table.Column(nullable: true), + DeletionTime = table.Column(nullable: true), TenantId = table.Column(nullable: true), UserName = table.Column(maxLength: 256, nullable: false), NormalizedUserName = table.Column(maxLength: 256, nullable: false), + Name = table.Column(maxLength: 64, nullable: true), + Surname = table.Column(maxLength: 64, nullable: true), Email = table.Column(maxLength: 256, nullable: true), NormalizedEmail = table.Column(maxLength: 256, nullable: true), EmailConfirmed = table.Column(nullable: false, defaultValue: false), @@ -282,8 +312,8 @@ namespace MyCompanyName.MyProjectName.Migrations { TenantId = table.Column(nullable: true), UserId = table.Column(nullable: false), - LoginProvider = table.Column(maxLength: 128, nullable: false), - Name = table.Column(nullable: false), + LoginProvider = table.Column(maxLength: 64, nullable: false), + Name = table.Column(maxLength: 128, nullable: false), Value = table.Column(nullable: true) }, constraints: table => @@ -446,6 +476,9 @@ namespace MyCompanyName.MyProjectName.Migrations migrationBuilder.DropTable( name: "AbpBackgroundJobs"); + migrationBuilder.DropTable( + name: "AbpClaimTypes"); + migrationBuilder.DropTable( name: "AbpEntityPropertyChanges"); diff --git a/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/MyProjectNameDbContextModelSnapshot.cs b/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/MyProjectNameDbContextModelSnapshot.cs index 27ba9fe6ad..eff7489955 100644 --- a/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/MyProjectNameDbContextModelSnapshot.cs +++ b/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/MyProjectNameDbContextModelSnapshot.cs @@ -253,6 +253,35 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("AbpBackgroundJobs"); }); + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Description") + .HasMaxLength(256); + + b.Property("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256); + + b.Property("Regex") + .HasMaxLength(512); + + b.Property("RegexDescription") + .HasMaxLength(128); + + b.Property("Required"); + + b.Property("ValueType"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes"); + }); + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => { b.Property("Id") @@ -260,6 +289,15 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp"); + b.Property("IsDefault") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnName("IsStatic"); + b.Property("Name") .IsRequired() .HasMaxLength(256); @@ -315,6 +353,14 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnName("ConcurrencyStamp") .HasMaxLength(256); + b.Property("CreationTime"); + + b.Property("CreatorId"); + + b.Property("DeleterId"); + + b.Property("DeletionTime"); + b.Property("Email") .HasColumnName("Email") .HasMaxLength(256); @@ -327,6 +373,12 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ExtraProperties") .HasColumnName("ExtraProperties"); + b.Property("IsDeleted"); + + b.Property("LastModificationTime"); + + b.Property("LastModifierId"); + b.Property("LockoutEnabled") .ValueGeneratedOnAdd() .HasColumnName("LockoutEnabled") @@ -334,6 +386,10 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("LockoutEnd"); + b.Property("Name") + .HasColumnName("Name") + .HasMaxLength(64); + b.Property("NormalizedEmail") .HasColumnName("NormalizedEmail") .HasMaxLength(256); @@ -361,6 +417,10 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnName("SecurityStamp") .HasMaxLength(256); + b.Property("Surname") + .HasColumnName("Surname") + .HasMaxLength(64); + b.Property("TenantId") .HasColumnName("TenantId"); @@ -453,9 +513,10 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("UserId"); b.Property("LoginProvider") - .HasMaxLength(128); + .HasMaxLength(64); - b.Property("Name"); + b.Property("Name") + .HasMaxLength(128); b.Property("TenantId"); diff --git a/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName.MyProjectName.EntityFrameworkCore.csproj b/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName.MyProjectName.EntityFrameworkCore.csproj index 784a8f4ae7..c3e54f4327 100644 --- a/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName.MyProjectName.EntityFrameworkCore.csproj +++ b/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName.MyProjectName.EntityFrameworkCore.csproj @@ -5,12 +5,6 @@ MyCompanyName.MyProjectName - - - - - -