Update initial migrations
This commit is contained in:
parent
eabde9fe9e
commit
5d2f598c80
|
|
@ -3,39 +3,39 @@
|
||||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="Package Versions">
|
<PropertyGroup Label="Package Versions">
|
||||||
<InternalAspNetCoreSdkPackageVersion>2.1.0-preview1-15652</InternalAspNetCoreSdkPackageVersion>
|
<InternalAspNetCoreSdkPackageVersion>2.1.0-preview1-15670</InternalAspNetCoreSdkPackageVersion>
|
||||||
<MicrosoftAspNetCoreAllPackageVersion>2.1.0-preview1-28000</MicrosoftAspNetCoreAllPackageVersion>
|
<MicrosoftAspNetCoreAllPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreAllPackageVersion>
|
||||||
<MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>2.1.0-preview1-28000</MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>
|
<MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>
|
||||||
<MicrosoftAspNetCoreAuthenticationJwtBearerPackageVersion>2.1.0-preview1-28000</MicrosoftAspNetCoreAuthenticationJwtBearerPackageVersion>
|
<MicrosoftAspNetCoreAuthenticationJwtBearerPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreAuthenticationJwtBearerPackageVersion>
|
||||||
<MicrosoftAspNetCoreAuthenticationOpenIdConnectPackageVersion>2.1.0-preview1-28000</MicrosoftAspNetCoreAuthenticationOpenIdConnectPackageVersion>
|
<MicrosoftAspNetCoreAuthenticationOpenIdConnectPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreAuthenticationOpenIdConnectPackageVersion>
|
||||||
<MicrosoftAspNetCoreCertificatesGenerationSourcesPackageVersion>2.1.0-preview1-28000</MicrosoftAspNetCoreCertificatesGenerationSourcesPackageVersion>
|
<MicrosoftAspNetCoreCertificatesGenerationSourcesPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreCertificatesGenerationSourcesPackageVersion>
|
||||||
<MicrosoftAspNetCoreCookiePolicyPackageVersion>2.1.0-preview1-28000</MicrosoftAspNetCoreCookiePolicyPackageVersion>
|
<MicrosoftAspNetCoreCookiePolicyPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreCookiePolicyPackageVersion>
|
||||||
<MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion>2.1.0-preview1-28000</MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion>
|
<MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion>
|
||||||
<MicrosoftAspNetCoreHttpsPolicyPackageVersion>2.1.0-preview1-28000</MicrosoftAspNetCoreHttpsPolicyPackageVersion>
|
<MicrosoftAspNetCoreHttpsPolicyPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreHttpsPolicyPackageVersion>
|
||||||
<MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion>2.1.0-preview1-28000</MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion>
|
<MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion>
|
||||||
<MicrosoftAspNetCoreIdentityUIPackageVersion>2.1.0-preview1-28000</MicrosoftAspNetCoreIdentityUIPackageVersion>
|
<MicrosoftAspNetCoreIdentityUIPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreIdentityUIPackageVersion>
|
||||||
<MicrosoftAspNetCoreMvcPackageVersion>2.1.0-preview1-28000</MicrosoftAspNetCoreMvcPackageVersion>
|
<MicrosoftAspNetCoreMvcPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreMvcPackageVersion>
|
||||||
<MicrosoftAspNetCoreMvcRazorViewCompilationPackageVersion>2.1.0-preview1-28000</MicrosoftAspNetCoreMvcRazorViewCompilationPackageVersion>
|
<MicrosoftAspNetCoreMvcRazorViewCompilationPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreMvcRazorViewCompilationPackageVersion>
|
||||||
<MicrosoftAspNetCorePackageVersion>2.1.0-preview1-28000</MicrosoftAspNetCorePackageVersion>
|
<MicrosoftAspNetCorePackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCorePackageVersion>
|
||||||
<MicrosoftAspNetCoreSpaServicesExtensionsPackageVersion>2.1.0-preview1-28000</MicrosoftAspNetCoreSpaServicesExtensionsPackageVersion>
|
<MicrosoftAspNetCoreSpaServicesExtensionsPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreSpaServicesExtensionsPackageVersion>
|
||||||
<MicrosoftAspNetCoreSpaServicesPackageVersion>2.1.0-preview1-28000</MicrosoftAspNetCoreSpaServicesPackageVersion>
|
<MicrosoftAspNetCoreSpaServicesPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreSpaServicesPackageVersion>
|
||||||
<MicrosoftAspNetCoreStaticFilesPackageVersion>2.1.0-preview1-28000</MicrosoftAspNetCoreStaticFilesPackageVersion>
|
<MicrosoftAspNetCoreStaticFilesPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreStaticFilesPackageVersion>
|
||||||
<MicrosoftAspNetCoreTestingPackageVersion>2.1.0-preview1-28000</MicrosoftAspNetCoreTestingPackageVersion>
|
<MicrosoftAspNetCoreTestingPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreTestingPackageVersion>
|
||||||
<MicrosoftBuildFrameworkPackageVersion>15.3.409</MicrosoftBuildFrameworkPackageVersion>
|
<MicrosoftBuildFrameworkPackageVersion>15.3.409</MicrosoftBuildFrameworkPackageVersion>
|
||||||
<MicrosoftBuildUtilitiesCorePackageVersion>15.3.409</MicrosoftBuildUtilitiesCorePackageVersion>
|
<MicrosoftBuildUtilitiesCorePackageVersion>15.3.409</MicrosoftBuildUtilitiesCorePackageVersion>
|
||||||
<MicrosoftEntityFrameworkCoreDesignPackageVersion>2.1.0-preview1-28000</MicrosoftEntityFrameworkCoreDesignPackageVersion>
|
<MicrosoftEntityFrameworkCoreDesignPackageVersion>2.1.0-preview1-28092</MicrosoftEntityFrameworkCoreDesignPackageVersion>
|
||||||
<MicrosoftEntityFrameworkCoreSqlitePackageVersion>2.1.0-preview1-28000</MicrosoftEntityFrameworkCoreSqlitePackageVersion>
|
<MicrosoftEntityFrameworkCoreSqlitePackageVersion>2.1.0-preview1-28092</MicrosoftEntityFrameworkCoreSqlitePackageVersion>
|
||||||
<MicrosoftEntityFrameworkCoreSqlServerPackageVersion>2.1.0-preview1-28000</MicrosoftEntityFrameworkCoreSqlServerPackageVersion>
|
<MicrosoftEntityFrameworkCoreSqlServerPackageVersion>2.1.0-preview1-28092</MicrosoftEntityFrameworkCoreSqlServerPackageVersion>
|
||||||
<MicrosoftEntityFrameworkCoreToolsDotNetPackageVersion>2.1.0-preview1-28000</MicrosoftEntityFrameworkCoreToolsDotNetPackageVersion>
|
<MicrosoftEntityFrameworkCoreToolsDotNetPackageVersion>2.1.0-preview1-28092</MicrosoftEntityFrameworkCoreToolsDotNetPackageVersion>
|
||||||
<MicrosoftEntityFrameworkCoreToolsPackageVersion>2.1.0-preview1-28000</MicrosoftEntityFrameworkCoreToolsPackageVersion>
|
<MicrosoftEntityFrameworkCoreToolsPackageVersion>2.1.0-preview1-28092</MicrosoftEntityFrameworkCoreToolsPackageVersion>
|
||||||
<MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>2.1.0-preview1-28000</MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>
|
<MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>2.1.0-preview1-28092</MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>
|
||||||
<MicrosoftExtensionsProcessSourcesPackageVersion>2.1.0-preview1-28000</MicrosoftExtensionsProcessSourcesPackageVersion>
|
<MicrosoftExtensionsProcessSourcesPackageVersion>2.1.0-preview1-28092</MicrosoftExtensionsProcessSourcesPackageVersion>
|
||||||
<MicrosoftNETCoreApp20PackageVersion>2.0.0</MicrosoftNETCoreApp20PackageVersion>
|
<MicrosoftNETCoreApp20PackageVersion>2.0.0</MicrosoftNETCoreApp20PackageVersion>
|
||||||
<MicrosoftNETCoreApp21PackageVersion>2.1.0-preview1-26102-01</MicrosoftNETCoreApp21PackageVersion>
|
<MicrosoftNETCoreApp21PackageVersion>2.1.0-preview1-26102-01</MicrosoftNETCoreApp21PackageVersion>
|
||||||
<MicrosoftNETTestSdkPackageVersion>15.3.0</MicrosoftNETTestSdkPackageVersion>
|
<MicrosoftNETTestSdkPackageVersion>15.3.0</MicrosoftNETTestSdkPackageVersion>
|
||||||
<MicrosoftVisualStudioWebBrowserLinkPackageVersion>2.1.0-preview1-28000</MicrosoftVisualStudioWebBrowserLinkPackageVersion>
|
<MicrosoftVisualStudioWebBrowserLinkPackageVersion>2.1.0-preview1-28092</MicrosoftVisualStudioWebBrowserLinkPackageVersion>
|
||||||
<MicrosoftVisualStudioWebCodeGenerationDesignPackageVersion>2.1.0-preview1-28000</MicrosoftVisualStudioWebCodeGenerationDesignPackageVersion>
|
<MicrosoftVisualStudioWebCodeGenerationDesignPackageVersion>2.1.0-preview1-28092</MicrosoftVisualStudioWebCodeGenerationDesignPackageVersion>
|
||||||
<MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion>2.1.0-preview1-28000</MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion>
|
<MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion>2.1.0-preview1-28092</MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion>
|
||||||
<NETStandardLibraryPackageVersion>2.0.0</NETStandardLibraryPackageVersion>
|
<NETStandardLibraryPackageVersion>2.0.0</NETStandardLibraryPackageVersion>
|
||||||
<SeleniumFirefoxWebDriverPackageVersion>0.19.0</SeleniumFirefoxWebDriverPackageVersion>
|
<SeleniumFirefoxWebDriverPackageVersion>0.19.0</SeleniumFirefoxWebDriverPackageVersion>
|
||||||
<SeleniumSupportPackageVersion>3.7.0</SeleniumSupportPackageVersion>
|
<SeleniumSupportPackageVersion>3.7.0</SeleniumSupportPackageVersion>
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
version:2.1.0-preview1-15661
|
version:2.1.0-preview1-15670
|
||||||
commithash:c9349d4c8a495d3085d9b879214d80f2f45e2193
|
commithash:49176144e03c3015d83b21e3f1d0ce093c05ecc3
|
||||||
|
|
|
||||||
|
|
@ -18,39 +18,94 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
{
|
{
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
modelBuilder
|
||||||
#if (UseLocalDB)
|
#if (UseLocalDB)
|
||||||
.HasAnnotation("ProductVersion", "1.0.0-rc3")
|
.HasAnnotation("ProductVersion", "2.1.0-preview1")
|
||||||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||||
#else
|
#else
|
||||||
.HasAnnotation("ProductVersion", "1.0.2");
|
.HasAnnotation("ProductVersion", "2.1.0-preview1");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b =>
|
||||||
|
{
|
||||||
|
b.Property<string>("Id")
|
||||||
|
.ValueGeneratedOnAdd();
|
||||||
|
|
||||||
|
b.Property<int>("AccessFailedCount");
|
||||||
|
|
||||||
|
b.Property<string>("ConcurrencyStamp")
|
||||||
|
.IsConcurrencyToken();
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.HasMaxLength(256);
|
||||||
|
|
||||||
|
b.Property<bool>("EmailConfirmed");
|
||||||
|
|
||||||
|
b.Property<bool>("LockoutEnabled");
|
||||||
|
|
||||||
|
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||||
|
|
||||||
|
b.Property<string>("NormalizedEmail")
|
||||||
|
.HasMaxLength(256);
|
||||||
|
|
||||||
|
b.Property<string>("NormalizedUserName")
|
||||||
|
.HasMaxLength(256);
|
||||||
|
|
||||||
|
b.Property<string>("PasswordHash");
|
||||||
|
|
||||||
|
b.Property<string>("PhoneNumber");
|
||||||
|
|
||||||
|
b.Property<bool>("PhoneNumberConfirmed");
|
||||||
|
|
||||||
|
b.Property<string>("SecurityStamp");
|
||||||
|
|
||||||
|
b.Property<bool>("TwoFactorEnabled");
|
||||||
|
|
||||||
|
b.Property<string>("UserName")
|
||||||
|
.HasMaxLength(256);
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("NormalizedEmail")
|
||||||
|
.HasName("EmailIndex");
|
||||||
|
|
||||||
|
b.HasIndex("NormalizedUserName")
|
||||||
|
.IsUnique()
|
||||||
|
#if (UseLocalDB)
|
||||||
|
.HasName("UserNameIndex")
|
||||||
|
.HasFilter("[NormalizedUserName] IS NOT NULL");
|
||||||
|
#else
|
||||||
|
.HasName("UserNameIndex");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
b.ToTable("AspNetUsers");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id");
|
b.Property<string>("Id")
|
||||||
|
.ValueGeneratedOnAdd();
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
b.Property<string>("ConcurrencyStamp")
|
||||||
.IsConcurrencyToken();
|
.IsConcurrencyToken();
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
#if (UseLocalDB)
|
|
||||||
.HasAnnotation("MaxLength", 256);
|
|
||||||
#else
|
|
||||||
.HasMaxLength(256);
|
.HasMaxLength(256);
|
||||||
#endif
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedName")
|
b.Property<string>("NormalizedName")
|
||||||
#if (UseLocalDB)
|
|
||||||
.HasAnnotation("MaxLength", 256);
|
|
||||||
#else
|
|
||||||
.HasMaxLength(256);
|
.HasMaxLength(256);
|
||||||
#endif
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("NormalizedName")
|
b.HasIndex("NormalizedName")
|
||||||
|
.IsUnique()
|
||||||
|
#if (UseLocalDB)
|
||||||
|
.HasName("RoleNameIndex")
|
||||||
|
.HasFilter("[NormalizedName] IS NOT NULL");
|
||||||
|
#else
|
||||||
.HasName("RoleNameIndex");
|
.HasName("RoleNameIndex");
|
||||||
|
#endif
|
||||||
|
|
||||||
b.ToTable("AspNetRoles");
|
b.ToTable("AspNetRoles");
|
||||||
});
|
});
|
||||||
|
|
@ -95,9 +150,11 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("LoginProvider");
|
b.Property<string>("LoginProvider")
|
||||||
|
.HasMaxLength(128);
|
||||||
|
|
||||||
b.Property<string>("ProviderKey");
|
b.Property<string>("ProviderKey")
|
||||||
|
.HasMaxLength(128);
|
||||||
|
|
||||||
b.Property<string>("ProviderDisplayName");
|
b.Property<string>("ProviderDisplayName");
|
||||||
|
|
||||||
|
|
@ -121,8 +178,6 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
|
|
||||||
b.HasIndex("RoleId");
|
b.HasIndex("RoleId");
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserRoles");
|
b.ToTable("AspNetUserRoles");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -130,9 +185,11 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
{
|
{
|
||||||
b.Property<string>("UserId");
|
b.Property<string>("UserId");
|
||||||
|
|
||||||
b.Property<string>("LoginProvider");
|
b.Property<string>("LoginProvider")
|
||||||
|
.HasMaxLength(128);
|
||||||
|
|
||||||
b.Property<string>("Name");
|
b.Property<string>("Name")
|
||||||
|
.HasMaxLength(128);
|
||||||
|
|
||||||
b.Property<string>("Value");
|
b.Property<string>("Value");
|
||||||
|
|
||||||
|
|
@ -141,75 +198,10 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
b.ToTable("AspNetUserTokens");
|
b.ToTable("AspNetUserTokens");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id");
|
|
||||||
|
|
||||||
b.Property<int>("AccessFailedCount");
|
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
|
||||||
.IsConcurrencyToken();
|
|
||||||
|
|
||||||
b.Property<string>("Email")
|
|
||||||
#if (UseLocalDB)
|
|
||||||
.HasAnnotation("MaxLength", 256);
|
|
||||||
#else
|
|
||||||
.HasMaxLength(256);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
b.Property<bool>("EmailConfirmed");
|
|
||||||
|
|
||||||
b.Property<bool>("LockoutEnabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedEmail")
|
|
||||||
#if (UseLocalDB)
|
|
||||||
.HasAnnotation("MaxLength", 256);
|
|
||||||
#else
|
|
||||||
.HasMaxLength(256);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedUserName")
|
|
||||||
#if (UseLocalDB)
|
|
||||||
.HasAnnotation("MaxLength", 256);
|
|
||||||
#else
|
|
||||||
.HasMaxLength(256);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
b.Property<string>("PasswordHash");
|
|
||||||
|
|
||||||
b.Property<string>("PhoneNumber");
|
|
||||||
|
|
||||||
b.Property<bool>("PhoneNumberConfirmed");
|
|
||||||
|
|
||||||
b.Property<string>("SecurityStamp");
|
|
||||||
|
|
||||||
b.Property<bool>("TwoFactorEnabled");
|
|
||||||
|
|
||||||
b.Property<string>("UserName")
|
|
||||||
#if (UseLocalDB)
|
|
||||||
.HasAnnotation("MaxLength", 256);
|
|
||||||
#else
|
|
||||||
.HasMaxLength(256);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("NormalizedEmail")
|
|
||||||
.HasName("EmailIndex");
|
|
||||||
|
|
||||||
b.HasIndex("NormalizedUserName")
|
|
||||||
.IsUnique()
|
|
||||||
.HasName("UserNameIndex");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUsers");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
|
||||||
.WithMany("Claims")
|
.WithMany()
|
||||||
.HasForeignKey("RoleId")
|
.HasForeignKey("RoleId")
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
});
|
});
|
||||||
|
|
@ -217,7 +209,7 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser")
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser")
|
||||||
.WithMany("Claims")
|
.WithMany()
|
||||||
.HasForeignKey("UserId")
|
.HasForeignKey("UserId")
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
});
|
});
|
||||||
|
|
@ -225,7 +217,7 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser")
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser")
|
||||||
.WithMany("Logins")
|
.WithMany()
|
||||||
.HasForeignKey("UserId")
|
.HasForeignKey("UserId")
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
});
|
});
|
||||||
|
|
@ -233,15 +225,24 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
|
||||||
.WithMany("Users")
|
.WithMany()
|
||||||
.HasForeignKey("RoleId")
|
.HasForeignKey("RoleId")
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
|
|
||||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser")
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser")
|
||||||
.WithMany("Roles")
|
.WithMany()
|
||||||
.HasForeignKey("UserId")
|
.HasForeignKey("UserId")
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
#if (UseLocalDB)
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
#if (UseLocalDB)
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
#endif
|
#endif
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
@ -27,20 +27,6 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
table.PrimaryKey("PK_AspNetRoles", x => x.Id);
|
table.PrimaryKey("PK_AspNetRoles", x => x.Id);
|
||||||
});
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "AspNetUserTokens",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
UserId = table.Column<string>(nullable: false),
|
|
||||||
LoginProvider = table.Column<string>(nullable: false),
|
|
||||||
Name = table.Column<string>(nullable: false),
|
|
||||||
Value = table.Column<string>(nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name });
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "AspNetUsers",
|
name: "AspNetUsers",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
|
|
@ -74,7 +60,7 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
#if (UseLocalDB)
|
#if (UseLocalDB)
|
||||||
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
|
||||||
#else
|
#else
|
||||||
.Annotation("Autoincrement", true),
|
.Annotation("Sqlite:Autoincrement", true),
|
||||||
#endif
|
#endif
|
||||||
ClaimType = table.Column<string>(nullable: true),
|
ClaimType = table.Column<string>(nullable: true),
|
||||||
ClaimValue = table.Column<string>(nullable: true),
|
ClaimValue = table.Column<string>(nullable: true),
|
||||||
|
|
@ -99,7 +85,7 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
#if (UseLocalDB)
|
#if (UseLocalDB)
|
||||||
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
|
||||||
#else
|
#else
|
||||||
.Annotation("Autoincrement", true),
|
.Annotation("Sqlite:Autoincrement", true),
|
||||||
#endif
|
#endif
|
||||||
ClaimType = table.Column<string>(nullable: true),
|
ClaimType = table.Column<string>(nullable: true),
|
||||||
ClaimValue = table.Column<string>(nullable: true),
|
ClaimValue = table.Column<string>(nullable: true),
|
||||||
|
|
@ -120,8 +106,8 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
name: "AspNetUserLogins",
|
name: "AspNetUserLogins",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
LoginProvider = table.Column<string>(nullable: false),
|
LoginProvider = table.Column<string>(maxLength: 128, nullable: false),
|
||||||
ProviderKey = table.Column<string>(nullable: false),
|
ProviderKey = table.Column<string>(maxLength: 128, nullable: false),
|
||||||
ProviderDisplayName = table.Column<string>(nullable: true),
|
ProviderDisplayName = table.Column<string>(nullable: true),
|
||||||
UserId = table.Column<string>(nullable: false)
|
UserId = table.Column<string>(nullable: false)
|
||||||
},
|
},
|
||||||
|
|
@ -160,16 +146,42 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
onDelete: ReferentialAction.Cascade);
|
onDelete: ReferentialAction.Cascade);
|
||||||
});
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateTable(
|
||||||
name: "RoleNameIndex",
|
name: "AspNetUserTokens",
|
||||||
table: "AspNetRoles",
|
columns: table => new
|
||||||
column: "NormalizedName");
|
{
|
||||||
|
UserId = table.Column<string>(nullable: false),
|
||||||
|
LoginProvider = table.Column<string>(maxLength: 128, nullable: false),
|
||||||
|
Name = table.Column<string>(maxLength: 128, nullable: false),
|
||||||
|
Value = table.Column<string>(nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name });
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_AspNetUserTokens_AspNetUsers_UserId",
|
||||||
|
column: x => x.UserId,
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_AspNetRoleClaims_RoleId",
|
name: "IX_AspNetRoleClaims_RoleId",
|
||||||
table: "AspNetRoleClaims",
|
table: "AspNetRoleClaims",
|
||||||
column: "RoleId");
|
column: "RoleId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "RoleNameIndex",
|
||||||
|
table: "AspNetRoles",
|
||||||
|
column: "NormalizedName",
|
||||||
|
#if (UseLocalDB)
|
||||||
|
unique: true,
|
||||||
|
filter: "[NormalizedName] IS NOT NULL");
|
||||||
|
#else
|
||||||
|
unique: true);
|
||||||
|
#endif
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_AspNetUserClaims_UserId",
|
name: "IX_AspNetUserClaims_UserId",
|
||||||
table: "AspNetUserClaims",
|
table: "AspNetUserClaims",
|
||||||
|
|
@ -185,11 +197,6 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
table: "AspNetUserRoles",
|
table: "AspNetUserRoles",
|
||||||
column: "RoleId");
|
column: "RoleId");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_AspNetUserRoles_UserId",
|
|
||||||
table: "AspNetUserRoles",
|
|
||||||
column: "UserId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "EmailIndex",
|
name: "EmailIndex",
|
||||||
table: "AspNetUsers",
|
table: "AspNetUsers",
|
||||||
|
|
@ -199,7 +206,12 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
name: "UserNameIndex",
|
name: "UserNameIndex",
|
||||||
table: "AspNetUsers",
|
table: "AspNetUsers",
|
||||||
column: "NormalizedUserName",
|
column: "NormalizedUserName",
|
||||||
|
#if (UseLocalDB)
|
||||||
|
unique: true,
|
||||||
|
filter: "[NormalizedUserName] IS NOT NULL");
|
||||||
|
#else
|
||||||
unique: true);
|
unique: true);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
|
@ -226,4 +238,4 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
name: "AspNetUsers");
|
name: "AspNetUsers");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -19,10 +19,10 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
{
|
{
|
||||||
modelBuilder
|
modelBuilder
|
||||||
#if (UseLocalDB)
|
#if (UseLocalDB)
|
||||||
.HasAnnotation("ProductVersion", "1.0.0-rc3")
|
.HasAnnotation("ProductVersion", "2.1.0-preview1")
|
||||||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||||
#else
|
#else
|
||||||
.HasAnnotation("ProductVersion", "1.0.2");
|
.HasAnnotation("ProductVersion", "2.1.0-preview1");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole", b =>
|
||||||
|
|
@ -94,9 +94,11 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin<string>", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("LoginProvider");
|
b.Property<string>("LoginProvider")
|
||||||
|
.HasMaxLength(128);
|
||||||
|
|
||||||
b.Property<string>("ProviderKey");
|
b.Property<string>("ProviderKey")
|
||||||
|
.HasMaxLength(128);
|
||||||
|
|
||||||
b.Property<string>("ProviderDisplayName");
|
b.Property<string>("ProviderDisplayName");
|
||||||
|
|
||||||
|
|
@ -129,9 +131,11 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
{
|
{
|
||||||
b.Property<string>("UserId");
|
b.Property<string>("UserId");
|
||||||
|
|
||||||
b.Property<string>("LoginProvider");
|
b.Property<string>("LoginProvider")
|
||||||
|
.HasMaxLength(128);
|
||||||
|
|
||||||
b.Property<string>("Name");
|
b.Property<string>("Name")
|
||||||
|
.HasMaxLength(128);
|
||||||
|
|
||||||
b.Property<string>("Value");
|
b.Property<string>("Value");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ namespace Company.WebApplication1
|
||||||
sqlOptions => sqlOptions.MigrationsAssembly("Company.WebApplication1")));
|
sqlOptions => sqlOptions.MigrationsAssembly("Company.WebApplication1")));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
services.AddIdentity<IdentityUser, IdentityRole>()
|
services.AddIdentity<IdentityUser, IdentityRole>(options => options.Stores.MaxLengthForKeys = 128)
|
||||||
.AddEntityFrameworkStores<IdentityDbContext>()
|
.AddEntityFrameworkStores<IdentityDbContext>()
|
||||||
.AddDefaultUI()
|
.AddDefaultUI()
|
||||||
.AddDefaultTokenProviders();
|
.AddDefaultTokenProviders();
|
||||||
|
|
|
||||||
|
|
@ -18,39 +18,94 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
{
|
{
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
modelBuilder
|
||||||
#if (UseLocalDB)
|
#if (UseLocalDB)
|
||||||
.HasAnnotation("ProductVersion", "1.0.0-rc3")
|
.HasAnnotation("ProductVersion", "2.1.0-preview1")
|
||||||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||||
#else
|
#else
|
||||||
.HasAnnotation("ProductVersion", "1.0.2");
|
.HasAnnotation("ProductVersion", "2.1.0-preview1");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b =>
|
||||||
|
{
|
||||||
|
b.Property<string>("Id")
|
||||||
|
.ValueGeneratedOnAdd();
|
||||||
|
|
||||||
|
b.Property<int>("AccessFailedCount");
|
||||||
|
|
||||||
|
b.Property<string>("ConcurrencyStamp")
|
||||||
|
.IsConcurrencyToken();
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.HasMaxLength(256);
|
||||||
|
|
||||||
|
b.Property<bool>("EmailConfirmed");
|
||||||
|
|
||||||
|
b.Property<bool>("LockoutEnabled");
|
||||||
|
|
||||||
|
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||||
|
|
||||||
|
b.Property<string>("NormalizedEmail")
|
||||||
|
.HasMaxLength(256);
|
||||||
|
|
||||||
|
b.Property<string>("NormalizedUserName")
|
||||||
|
.HasMaxLength(256);
|
||||||
|
|
||||||
|
b.Property<string>("PasswordHash");
|
||||||
|
|
||||||
|
b.Property<string>("PhoneNumber");
|
||||||
|
|
||||||
|
b.Property<bool>("PhoneNumberConfirmed");
|
||||||
|
|
||||||
|
b.Property<string>("SecurityStamp");
|
||||||
|
|
||||||
|
b.Property<bool>("TwoFactorEnabled");
|
||||||
|
|
||||||
|
b.Property<string>("UserName")
|
||||||
|
.HasMaxLength(256);
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("NormalizedEmail")
|
||||||
|
.HasName("EmailIndex");
|
||||||
|
|
||||||
|
b.HasIndex("NormalizedUserName")
|
||||||
|
.IsUnique()
|
||||||
|
#if (UseLocalDB)
|
||||||
|
.HasName("UserNameIndex")
|
||||||
|
.HasFilter("[NormalizedUserName] IS NOT NULL");
|
||||||
|
#else
|
||||||
|
.HasName("UserNameIndex");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
b.ToTable("AspNetUsers");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id");
|
b.Property<string>("Id")
|
||||||
|
.ValueGeneratedOnAdd();
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
b.Property<string>("ConcurrencyStamp")
|
||||||
.IsConcurrencyToken();
|
.IsConcurrencyToken();
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
#if (UseLocalDB)
|
|
||||||
.HasAnnotation("MaxLength", 256);
|
|
||||||
#else
|
|
||||||
.HasMaxLength(256);
|
.HasMaxLength(256);
|
||||||
#endif
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedName")
|
b.Property<string>("NormalizedName")
|
||||||
#if (UseLocalDB)
|
|
||||||
.HasAnnotation("MaxLength", 256);
|
|
||||||
#else
|
|
||||||
.HasMaxLength(256);
|
.HasMaxLength(256);
|
||||||
#endif
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("NormalizedName")
|
b.HasIndex("NormalizedName")
|
||||||
|
.IsUnique()
|
||||||
|
#if (UseLocalDB)
|
||||||
|
.HasName("RoleNameIndex")
|
||||||
|
.HasFilter("[NormalizedName] IS NOT NULL");
|
||||||
|
#else
|
||||||
.HasName("RoleNameIndex");
|
.HasName("RoleNameIndex");
|
||||||
|
#endif
|
||||||
|
|
||||||
b.ToTable("AspNetRoles");
|
b.ToTable("AspNetRoles");
|
||||||
});
|
});
|
||||||
|
|
@ -95,9 +150,11 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("LoginProvider");
|
b.Property<string>("LoginProvider")
|
||||||
|
.HasMaxLength(128);
|
||||||
|
|
||||||
b.Property<string>("ProviderKey");
|
b.Property<string>("ProviderKey")
|
||||||
|
.HasMaxLength(128);
|
||||||
|
|
||||||
b.Property<string>("ProviderDisplayName");
|
b.Property<string>("ProviderDisplayName");
|
||||||
|
|
||||||
|
|
@ -121,8 +178,6 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
|
|
||||||
b.HasIndex("RoleId");
|
b.HasIndex("RoleId");
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserRoles");
|
b.ToTable("AspNetUserRoles");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -130,9 +185,11 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
{
|
{
|
||||||
b.Property<string>("UserId");
|
b.Property<string>("UserId");
|
||||||
|
|
||||||
b.Property<string>("LoginProvider");
|
b.Property<string>("LoginProvider")
|
||||||
|
.HasMaxLength(128);
|
||||||
|
|
||||||
b.Property<string>("Name");
|
b.Property<string>("Name")
|
||||||
|
.HasMaxLength(128);
|
||||||
|
|
||||||
b.Property<string>("Value");
|
b.Property<string>("Value");
|
||||||
|
|
||||||
|
|
@ -141,75 +198,10 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
b.ToTable("AspNetUserTokens");
|
b.ToTable("AspNetUserTokens");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id");
|
|
||||||
|
|
||||||
b.Property<int>("AccessFailedCount");
|
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
|
||||||
.IsConcurrencyToken();
|
|
||||||
|
|
||||||
b.Property<string>("Email")
|
|
||||||
#if (UseLocalDB)
|
|
||||||
.HasAnnotation("MaxLength", 256);
|
|
||||||
#else
|
|
||||||
.HasMaxLength(256);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
b.Property<bool>("EmailConfirmed");
|
|
||||||
|
|
||||||
b.Property<bool>("LockoutEnabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedEmail")
|
|
||||||
#if (UseLocalDB)
|
|
||||||
.HasAnnotation("MaxLength", 256);
|
|
||||||
#else
|
|
||||||
.HasMaxLength(256);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedUserName")
|
|
||||||
#if (UseLocalDB)
|
|
||||||
.HasAnnotation("MaxLength", 256);
|
|
||||||
#else
|
|
||||||
.HasMaxLength(256);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
b.Property<string>("PasswordHash");
|
|
||||||
|
|
||||||
b.Property<string>("PhoneNumber");
|
|
||||||
|
|
||||||
b.Property<bool>("PhoneNumberConfirmed");
|
|
||||||
|
|
||||||
b.Property<string>("SecurityStamp");
|
|
||||||
|
|
||||||
b.Property<bool>("TwoFactorEnabled");
|
|
||||||
|
|
||||||
b.Property<string>("UserName")
|
|
||||||
#if (UseLocalDB)
|
|
||||||
.HasAnnotation("MaxLength", 256);
|
|
||||||
#else
|
|
||||||
.HasMaxLength(256);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("NormalizedEmail")
|
|
||||||
.HasName("EmailIndex");
|
|
||||||
|
|
||||||
b.HasIndex("NormalizedUserName")
|
|
||||||
.IsUnique()
|
|
||||||
.HasName("UserNameIndex");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUsers");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
|
||||||
.WithMany("Claims")
|
.WithMany()
|
||||||
.HasForeignKey("RoleId")
|
.HasForeignKey("RoleId")
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
});
|
});
|
||||||
|
|
@ -217,7 +209,7 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser")
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser")
|
||||||
.WithMany("Claims")
|
.WithMany()
|
||||||
.HasForeignKey("UserId")
|
.HasForeignKey("UserId")
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
});
|
});
|
||||||
|
|
@ -225,7 +217,7 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser")
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser")
|
||||||
.WithMany("Logins")
|
.WithMany()
|
||||||
.HasForeignKey("UserId")
|
.HasForeignKey("UserId")
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
});
|
});
|
||||||
|
|
@ -233,15 +225,24 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
|
||||||
.WithMany("Users")
|
.WithMany()
|
||||||
.HasForeignKey("RoleId")
|
.HasForeignKey("RoleId")
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
|
|
||||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser")
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser")
|
||||||
.WithMany("Roles")
|
.WithMany()
|
||||||
.HasForeignKey("UserId")
|
.HasForeignKey("UserId")
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
#if (UseLocalDB)
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
#if (UseLocalDB)
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
#endif
|
#endif
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
@ -27,20 +27,6 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
table.PrimaryKey("PK_AspNetRoles", x => x.Id);
|
table.PrimaryKey("PK_AspNetRoles", x => x.Id);
|
||||||
});
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "AspNetUserTokens",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
UserId = table.Column<string>(nullable: false),
|
|
||||||
LoginProvider = table.Column<string>(nullable: false),
|
|
||||||
Name = table.Column<string>(nullable: false),
|
|
||||||
Value = table.Column<string>(nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name });
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "AspNetUsers",
|
name: "AspNetUsers",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
|
|
@ -74,7 +60,7 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
#if (UseLocalDB)
|
#if (UseLocalDB)
|
||||||
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
|
||||||
#else
|
#else
|
||||||
.Annotation("Autoincrement", true),
|
.Annotation("Sqlite:Autoincrement", true),
|
||||||
#endif
|
#endif
|
||||||
ClaimType = table.Column<string>(nullable: true),
|
ClaimType = table.Column<string>(nullable: true),
|
||||||
ClaimValue = table.Column<string>(nullable: true),
|
ClaimValue = table.Column<string>(nullable: true),
|
||||||
|
|
@ -99,7 +85,7 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
#if (UseLocalDB)
|
#if (UseLocalDB)
|
||||||
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
|
||||||
#else
|
#else
|
||||||
.Annotation("Autoincrement", true),
|
.Annotation("Sqlite:Autoincrement", true),
|
||||||
#endif
|
#endif
|
||||||
ClaimType = table.Column<string>(nullable: true),
|
ClaimType = table.Column<string>(nullable: true),
|
||||||
ClaimValue = table.Column<string>(nullable: true),
|
ClaimValue = table.Column<string>(nullable: true),
|
||||||
|
|
@ -120,8 +106,8 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
name: "AspNetUserLogins",
|
name: "AspNetUserLogins",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
LoginProvider = table.Column<string>(nullable: false),
|
LoginProvider = table.Column<string>(maxLength: 128, nullable: false),
|
||||||
ProviderKey = table.Column<string>(nullable: false),
|
ProviderKey = table.Column<string>(maxLength: 128, nullable: false),
|
||||||
ProviderDisplayName = table.Column<string>(nullable: true),
|
ProviderDisplayName = table.Column<string>(nullable: true),
|
||||||
UserId = table.Column<string>(nullable: false)
|
UserId = table.Column<string>(nullable: false)
|
||||||
},
|
},
|
||||||
|
|
@ -160,16 +146,42 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
onDelete: ReferentialAction.Cascade);
|
onDelete: ReferentialAction.Cascade);
|
||||||
});
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateTable(
|
||||||
name: "RoleNameIndex",
|
name: "AspNetUserTokens",
|
||||||
table: "AspNetRoles",
|
columns: table => new
|
||||||
column: "NormalizedName");
|
{
|
||||||
|
UserId = table.Column<string>(nullable: false),
|
||||||
|
LoginProvider = table.Column<string>(maxLength: 128, nullable: false),
|
||||||
|
Name = table.Column<string>(maxLength: 128, nullable: false),
|
||||||
|
Value = table.Column<string>(nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name });
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_AspNetUserTokens_AspNetUsers_UserId",
|
||||||
|
column: x => x.UserId,
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_AspNetRoleClaims_RoleId",
|
name: "IX_AspNetRoleClaims_RoleId",
|
||||||
table: "AspNetRoleClaims",
|
table: "AspNetRoleClaims",
|
||||||
column: "RoleId");
|
column: "RoleId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "RoleNameIndex",
|
||||||
|
table: "AspNetRoles",
|
||||||
|
column: "NormalizedName",
|
||||||
|
#if (UseLocalDB)
|
||||||
|
unique: true,
|
||||||
|
filter: "[NormalizedName] IS NOT NULL");
|
||||||
|
#else
|
||||||
|
unique: true);
|
||||||
|
#endif
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_AspNetUserClaims_UserId",
|
name: "IX_AspNetUserClaims_UserId",
|
||||||
table: "AspNetUserClaims",
|
table: "AspNetUserClaims",
|
||||||
|
|
@ -185,11 +197,6 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
table: "AspNetUserRoles",
|
table: "AspNetUserRoles",
|
||||||
column: "RoleId");
|
column: "RoleId");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_AspNetUserRoles_UserId",
|
|
||||||
table: "AspNetUserRoles",
|
|
||||||
column: "UserId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "EmailIndex",
|
name: "EmailIndex",
|
||||||
table: "AspNetUsers",
|
table: "AspNetUsers",
|
||||||
|
|
@ -199,7 +206,12 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
name: "UserNameIndex",
|
name: "UserNameIndex",
|
||||||
table: "AspNetUsers",
|
table: "AspNetUsers",
|
||||||
column: "NormalizedUserName",
|
column: "NormalizedUserName",
|
||||||
|
#if (UseLocalDB)
|
||||||
|
unique: true,
|
||||||
|
filter: "[NormalizedUserName] IS NOT NULL");
|
||||||
|
#else
|
||||||
unique: true);
|
unique: true);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
|
@ -226,4 +238,4 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
name: "AspNetUsers");
|
name: "AspNetUsers");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -19,10 +19,10 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
{
|
{
|
||||||
modelBuilder
|
modelBuilder
|
||||||
#if (UseLocalDB)
|
#if (UseLocalDB)
|
||||||
.HasAnnotation("ProductVersion", "1.0.0-rc3")
|
.HasAnnotation("ProductVersion", "2.1.0-preview1")
|
||||||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||||
#else
|
#else
|
||||||
.HasAnnotation("ProductVersion", "1.0.2");
|
.HasAnnotation("ProductVersion", "2.1.0-preview1");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole", b =>
|
||||||
|
|
@ -94,9 +94,11 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin<string>", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("LoginProvider");
|
b.Property<string>("LoginProvider")
|
||||||
|
.HasMaxLength(128);
|
||||||
|
|
||||||
b.Property<string>("ProviderKey");
|
b.Property<string>("ProviderKey")
|
||||||
|
.HasMaxLength(128);
|
||||||
|
|
||||||
b.Property<string>("ProviderDisplayName");
|
b.Property<string>("ProviderDisplayName");
|
||||||
|
|
||||||
|
|
@ -129,9 +131,11 @@ namespace Company.WebApplication1.Data.Migrations
|
||||||
{
|
{
|
||||||
b.Property<string>("UserId");
|
b.Property<string>("UserId");
|
||||||
|
|
||||||
b.Property<string>("LoginProvider");
|
b.Property<string>("LoginProvider")
|
||||||
|
.HasMaxLength(128);
|
||||||
|
|
||||||
b.Property<string>("Name");
|
b.Property<string>("Name")
|
||||||
|
.HasMaxLength(128);
|
||||||
|
|
||||||
b.Property<string>("Value");
|
b.Property<string>("Value");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ namespace Company.WebApplication1
|
||||||
sqlOptions => sqlOptions.MigrationsAssembly("Company.WebApplication1")));
|
sqlOptions => sqlOptions.MigrationsAssembly("Company.WebApplication1")));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
services.AddIdentity<IdentityUser, IdentityRole>()
|
services.AddIdentity<IdentityUser, IdentityRole>(options => options.Stores.MaxLengthForKeys = 128)
|
||||||
.AddEntityFrameworkStores<IdentityDbContext>()
|
.AddEntityFrameworkStores<IdentityDbContext>()
|
||||||
.AddDefaultUI()
|
.AddDefaultUI()
|
||||||
.AddDefaultTokenProviders();
|
.AddDefaultTokenProviders();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue