This commit is contained in:
Hao Kung 2018-05-03 13:25:01 -07:00
Родитель cb064b68c1 89956df7ea
Коммит f4f0821029
13 изменённых файлов: 286 добавлений и 240 удалений

Просмотреть файл

@ -1,18 +1,64 @@
SET version=2.1.0
echo Make sure to have ran build.cmd once to ensure artifacts have been created.
echo Generating version=%version%, edit updateMigrations.cmd to update the version.
echo Generating migration for RazorPages-SqlLite--------------
rd "Company.WebApplication1" /s /q
mkdir "Company.WebApplication1"
dotnet new razor --auth Individual -i ..\artifacts\build\Microsoft.DotNet.Web.ProjectTemplates.*.nupkg -o Company.WebApplication1
rd "Company.WebApplication1\Data\Migrations" /s /q
cd Company.WebApplication1
dotnet ef migrations add CreateIdentitySchema -o Data\Migrations
cd ..
move Company.WebApplication1\Data\Migrations\*.Designer.cs Company.WebApplication1\Data\Migrations\00000000000000_CreateIdentitySchema.Designer.cs
move Company.WebApplication1\Data\Migrations\*_CreateIdentitySchema.cs Company.WebApplication1\Data\Migrations\00000000000000_CreateIdentitySchema.cs
powershell.exe -command "(Get-Content Company.WebApplication1\Data\Migrations\00000000000000_CreateIdentitySchema.Designer.cs) -replace('([0-9]{14})_CreateIdentitySchema', '00000000000000_CreateIdentitySchema') | Set-Content Company.WebApplication1\Data\Migrations\00000000000000_CreateIdentitySchema.Designer.cs"
powershell.exe -command "(Get-Content Company.WebApplication1\Data\Migrations\00000000000000_CreateIdentitySchema.Designer.cs) -replace('[0-9].[0-9].[0-9]-[^-]*-[0-9]*', '%version%') | Set-Content Company.WebApplication1\Data\Migrations\00000000000000_CreateIdentitySchema.Designer.cs"
powershell.exe -command "(Get-Content Company.WebApplication1\Data\Migrations\ApplicationDbContextModelSnapshot.cs) -replace('[0-9].[0-9].[0-9]-[^-]*-[0-9]*', '%version%') | Set-Content Company.WebApplication1\Data\Migrations\ApplicationDbContextModelSnapshot.cs"
copy "Company.WebApplication1\Data\Migrations\*" "..\src\Microsoft.DotNet.Web.ProjectTemplates\content\RazorPagesWeb-CSharp\Data\SqlLite"
echo Generating migration for RazorPages-SqlServer(localb)--------------
rd "Company.WebApplication1" /s /q
mkdir "Company.WebApplication1"
dotnet new razor --auth Individual --use-local-db -i ..\artifacts\build\Microsoft.DotNet.Web.ProjectTemplates.*.nupkg -o Company.WebApplication1
rd "Company.WebApplication1\Data\Migrations" /s /q
cd Company.WebApplication1
dotnet ef migrations add CreateIdentitySchema -o Data\Migrations
cd ..
move Company.WebApplication1\Data\Migrations\*.Designer.cs Company.WebApplication1\Data\Migrations\00000000000000_CreateIdentitySchema.Designer.cs
move Company.WebApplication1\Data\Migrations\*_CreateIdentitySchema.cs Company.WebApplication1\Data\Migrations\00000000000000_CreateIdentitySchema.cs
powershell.exe -command "(Get-Content Company.WebApplication1\Data\Migrations\00000000000000_CreateIdentitySchema.Designer.cs) -replace('([0-9]{14})_CreateIdentitySchema', '00000000000000_CreateIdentitySchema') | Set-Content Company.WebApplication1\Data\Migrations\00000000000000_CreateIdentitySchema.Designer.cs"
powershell.exe -command "(Get-Content Company.WebApplication1\Data\Migrations\00000000000000_CreateIdentitySchema.Designer.cs) -replace('[0-9].[0-9].[0-9]-[^-]*-[0-9]*', '%version%') | Set-Content Company.WebApplication1\Data\Migrations\00000000000000_CreateIdentitySchema.Designer.cs"
powershell.exe -command "(Get-Content Company.WebApplication1\Data\Migrations\ApplicationDbContextModelSnapshot.cs) -replace('[0-9].[0-9].[0-9]-[^-]*-[0-9]*', '%version%') | Set-Content Company.WebApplication1\Data\Migrations\ApplicationDbContextModelSnapshot.cs"
copy "Company.WebApplication1\Data\Migrations\*" "..\src\Microsoft.DotNet.Web.ProjectTemplates\content\RazorPagesWeb-CSharp\Data\SqlServer"
rd "Company.WebApplication1" /s /q
echo Generating migration for StarterWeb-SqlServer(localb)--------------
mkdir "Company.WebApplication1"
dotnet new mvc --auth Individual --use-local-db -i ..\artifacts\build\Microsoft.DotNet.Web.ProjectTemplates.*.nupkg -o Company.WebApplication1
rd "Company.WebApplication1\Data\Migrations" /s /q
cd Company.WebApplication1
dotnet ef migrations add CreateIdentitySchema -o Data\Migrations
cd ..
move Company.WebApplication1\Data\Migrations\*.Designer.cs Company.WebApplication1\Data\Migrations\00000000000000_CreateIdentitySchema.Designer.cs
move Company.WebApplication1\Data\Migrations\*_CreateIdentitySchema.cs Company.WebApplication1\Data\Migrations\00000000000000_CreateIdentitySchema.cs
powershell.exe -command "(Get-Content Company.WebApplication1\Data\Migrations\00000000000000_CreateIdentitySchema.Designer.cs) -replace('([0-9]{14})_CreateIdentitySchema', '00000000000000_CreateIdentitySchema') | Set-Content Company.WebApplication1\Data\Migrations\00000000000000_CreateIdentitySchema.Designer.cs"
powershell.exe -command "(Get-Content Company.WebApplication1\Data\Migrations\00000000000000_CreateIdentitySchema.Designer.cs) -replace('[0-9].[0-9].[0-9]-[^-]*-[0-9]*', '%version%') | Set-Content Company.WebApplication1\Data\Migrations\00000000000000_CreateIdentitySchema.Designer.cs"
powershell.exe -command "(Get-Content Company.WebApplication1\Data\Migrations\ApplicationDbContextModelSnapshot.cs) -replace('[0-9].[0-9].[0-9]-[^-]*-[0-9]*', '%version%') | Set-Content Company.WebApplication1\Data\Migrations\ApplicationDbContextModelSnapshot.cs"
copy "Company.WebApplication1\Data\Migrations\*" "..\src\Microsoft.DotNet.Web.ProjectTemplates\content\StarterWeb-CSharp\Data\SqlServer"
echo Generating migration for StarterWeb-SqlLite--------------
rd "Company.WebApplication1" /s /q
mkdir "Company.WebApplication1"
dotnet new mvc --auth Individual -i ..\artifacts\build\Microsoft.DotNet.Web.ProjectTemplates.*.nupkg -o Company.WebApplication1
rd "Company.WebApplication1\Data\Migrations" /s /q
cd Company.WebApplication1
dotnet ef migrations add CreateIdentitySchema -o Data\Migrations
cd ..
move Company.WebApplication1\Data\Migrations\*.Designer.cs Company.WebApplication1\Data\Migrations\00000000000000_CreateIdentitySchema.Designer.cs
move Company.WebApplication1\Data\Migrations\*_CreateIdentitySchema.cs Company.WebApplication1\Data\Migrations\00000000000000_CreateIdentitySchema.cs
powershell.exe -command "(Get-Content Company.WebApplication1\Data\Migrations\00000000000000_CreateIdentitySchema.Designer.cs) -replace('([0-9]{14})_CreateIdentitySchema', '00000000000000_CreateIdentitySchema') | Set-Content Company.WebApplication1\Data\Migrations\00000000000000_CreateIdentitySchema.Designer.cs"
powershell.exe -command "(Get-Content Company.WebApplication1\Data\Migrations\00000000000000_CreateIdentitySchema.Designer.cs) -replace('[0-9].[0-9].[0-9]-[^-]*-[0-9]*', '%version%') | Set-Content Company.WebApplication1\Data\Migrations\00000000000000_CreateIdentitySchema.Designer.cs"
powershell.exe -command "(Get-Content Company.WebApplication1\Data\Migrations\ApplicationDbContextModelSnapshot.cs) -replace('[0-9].[0-9].[0-9]-[^-]*-[0-9]*', '%version%') | Set-Content Company.WebApplication1\Data\Migrations\ApplicationDbContextModelSnapshot.cs"
copy "Company.WebApplication1\Data\Migrations\*" "..\src\Microsoft.DotNet.Web.ProjectTemplates\content\StarterWeb-CSharp\Data\SqlLite"
rd "Company.WebApplication1" /s /q

Просмотреть файл

@ -1,8 +1,10 @@
using System;
// <auto-generated />
using System;
using Company.WebApplication1.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace Company.WebApplication1.Data.Migrations
{
@ -14,7 +16,49 @@ namespace Company.WebApplication1.Data.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.1.0-preview1");
.HasAnnotation("ProductVersion", "2.1.0");
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken();
b.Property<string>("Name")
.HasMaxLength(256);
b.Property<string>("NormalizedName")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique()
.HasName("RoleNameIndex");
b.ToTable("AspNetRoles");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClaimType");
b.Property<string>("ClaimValue");
b.Property<string>("RoleId")
.IsRequired();
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AspNetRoleClaims");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b =>
{
@ -66,48 +110,6 @@ namespace Company.WebApplication1.Data.Migrations
b.ToTable("AspNetUsers");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken();
b.Property<string>("Name")
.HasMaxLength(256);
b.Property<string>("NormalizedName")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique()
.HasName("RoleNameIndex");
b.ToTable("AspNetRoles");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClaimType");
b.Property<string>("ClaimValue");
b.Property<string>("RoleId")
.IsRequired();
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AspNetRoleClaims");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
b.Property<int>("Id")
@ -224,4 +226,4 @@ namespace Company.WebApplication1.Data.Migrations
#pragma warning restore 612, 618
}
}
}
}

Просмотреть файл

@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Company.WebApplication1.Data.Migrations
@ -217,4 +214,4 @@ namespace Company.WebApplication1.Data.Migrations
name: "AspNetUsers");
}
}
}
}

Просмотреть файл

@ -1,8 +1,9 @@
using System;
// <auto-generated />
using System;
using Company.WebApplication1.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace Company.WebApplication1.Data.Migrations
{
@ -13,7 +14,7 @@ namespace Company.WebApplication1.Data.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.1.0-preview1-28193");
.HasAnnotation("ProductVersion", "2.1.0");
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
@ -220,8 +221,7 @@ namespace Company.WebApplication1.Data.Migrations
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
#pragma warning restore 612, 618
}
}
}
}

Просмотреть файл

@ -1,11 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
// <auto-generated />
using System;
using Company.WebApplication1.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace Company.WebApplication1.Data.Migrations
{
@ -17,9 +17,54 @@ namespace Company.WebApplication1.Data.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.1.0-preview1")
.HasAnnotation("ProductVersion", "2.1.0")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken();
b.Property<string>("Name")
.HasMaxLength(256);
b.Property<string>("NormalizedName")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique()
.HasName("RoleNameIndex")
.HasFilter("[NormalizedName] IS NOT NULL");
b.ToTable("AspNetRoles");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("ClaimType");
b.Property<string>("ClaimValue");
b.Property<string>("RoleId")
.IsRequired();
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AspNetRoleClaims");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b =>
{
b.Property<string>("Id")
@ -71,53 +116,11 @@ namespace Company.WebApplication1.Data.Migrations
b.ToTable("AspNetUsers");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken();
b.Property<string>("Name")
.HasMaxLength(256);
b.Property<string>("NormalizedName")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique()
.HasName("RoleNameIndex")
.HasFilter("[NormalizedName] IS NOT NULL");
b.ToTable("AspNetRoles");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClaimType");
b.Property<string>("ClaimValue");
b.Property<string>("RoleId")
.IsRequired();
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AspNetRoleClaims");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("ClaimType");
@ -230,4 +233,4 @@ namespace Company.WebApplication1.Data.Migrations
#pragma warning restore 612, 618
}
}
}
}

Просмотреть файл

@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
@ -220,4 +217,4 @@ namespace Company.WebApplication1.Data.Migrations
name: "AspNetUsers");
}
}
}
}

Просмотреть файл

@ -1,11 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
// <auto-generated />
using System;
using Company.WebApplication1.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace Company.WebApplication1.Data.Migrations
{
@ -16,7 +15,8 @@ namespace Company.WebApplication1.Data.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.1.0-preview1-28193")
.HasAnnotation("ProductVersion", "2.1.0")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
@ -46,7 +46,8 @@ namespace Company.WebApplication1.Data.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("ClaimType");
@ -116,7 +117,8 @@ namespace Company.WebApplication1.Data.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("ClaimType");
@ -226,8 +228,7 @@ namespace Company.WebApplication1.Data.Migrations
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
#pragma warning restore 612, 618
}
}
}
}

Просмотреть файл

@ -1,8 +1,10 @@
using System;
// <auto-generated />
using System;
using Company.WebApplication1.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace Company.WebApplication1.Data.Migrations
{
@ -14,7 +16,49 @@ namespace Company.WebApplication1.Data.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.1.0-preview1");
.HasAnnotation("ProductVersion", "2.1.0");
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken();
b.Property<string>("Name")
.HasMaxLength(256);
b.Property<string>("NormalizedName")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique()
.HasName("RoleNameIndex");
b.ToTable("AspNetRoles");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClaimType");
b.Property<string>("ClaimValue");
b.Property<string>("RoleId")
.IsRequired();
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AspNetRoleClaims");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b =>
{
@ -66,48 +110,6 @@ namespace Company.WebApplication1.Data.Migrations
b.ToTable("AspNetUsers");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken();
b.Property<string>("Name")
.HasMaxLength(256);
b.Property<string>("NormalizedName")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique()
.HasName("RoleNameIndex");
b.ToTable("AspNetRoles");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClaimType");
b.Property<string>("ClaimValue");
b.Property<string>("RoleId")
.IsRequired();
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AspNetRoleClaims");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
b.Property<int>("Id")
@ -224,4 +226,4 @@ namespace Company.WebApplication1.Data.Migrations
#pragma warning restore 612, 618
}
}
}
}

Просмотреть файл

@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Company.WebApplication1.Data.Migrations
@ -217,4 +214,4 @@ namespace Company.WebApplication1.Data.Migrations
name: "AspNetUsers");
}
}
}
}

Просмотреть файл

@ -1,8 +1,9 @@
using System;
// <auto-generated />
using System;
using Company.WebApplication1.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace Company.WebApplication1.Data.Migrations
{
@ -13,7 +14,7 @@ namespace Company.WebApplication1.Data.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.1.0-preview1-28193");
.HasAnnotation("ProductVersion", "2.1.0");
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
@ -220,8 +221,7 @@ namespace Company.WebApplication1.Data.Migrations
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
#pragma warning restore 612, 618
}
}
}
}

Просмотреть файл

@ -1,11 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
// <auto-generated />
using System;
using Company.WebApplication1.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace Company.WebApplication1.Data.Migrations
{
@ -17,9 +17,54 @@ namespace Company.WebApplication1.Data.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.1.0-preview1")
.HasAnnotation("ProductVersion", "2.1.0")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken();
b.Property<string>("Name")
.HasMaxLength(256);
b.Property<string>("NormalizedName")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique()
.HasName("RoleNameIndex")
.HasFilter("[NormalizedName] IS NOT NULL");
b.ToTable("AspNetRoles");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("ClaimType");
b.Property<string>("ClaimValue");
b.Property<string>("RoleId")
.IsRequired();
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AspNetRoleClaims");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b =>
{
b.Property<string>("Id")
@ -71,53 +116,11 @@ namespace Company.WebApplication1.Data.Migrations
b.ToTable("AspNetUsers");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken();
b.Property<string>("Name")
.HasMaxLength(256);
b.Property<string>("NormalizedName")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique()
.HasName("RoleNameIndex")
.HasFilter("[NormalizedName] IS NOT NULL");
b.ToTable("AspNetRoles");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClaimType");
b.Property<string>("ClaimValue");
b.Property<string>("RoleId")
.IsRequired();
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AspNetRoleClaims");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("ClaimType");
@ -230,4 +233,4 @@ namespace Company.WebApplication1.Data.Migrations
#pragma warning restore 612, 618
}
}
}
}

Просмотреть файл

@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
@ -220,4 +217,4 @@ namespace Company.WebApplication1.Data.Migrations
name: "AspNetUsers");
}
}
}
}

Просмотреть файл

@ -1,11 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
// <auto-generated />
using System;
using Company.WebApplication1.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace Company.WebApplication1.Data.Migrations
{
@ -16,7 +15,8 @@ namespace Company.WebApplication1.Data.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.1.0-preview1-28193")
.HasAnnotation("ProductVersion", "2.1.0")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
@ -46,7 +46,8 @@ namespace Company.WebApplication1.Data.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("ClaimType");
@ -116,7 +117,8 @@ namespace Company.WebApplication1.Data.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("ClaimType");
@ -226,8 +228,7 @@ namespace Company.WebApplication1.Data.Migrations
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
#pragma warning restore 612, 618
}
}
}
}