From 0038741bae4f0c42262db96ab81bd14c6f6a0993 Mon Sep 17 00:00:00 2001 From: 杨宇千 Date: Sat, 17 Aug 2019 17:47:11 +0800 Subject: Enhance database. --- Timeline/Migrations/DatabaseContextModelSnapshot.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'Timeline/Migrations/DatabaseContextModelSnapshot.cs') diff --git a/Timeline/Migrations/DatabaseContextModelSnapshot.cs b/Timeline/Migrations/DatabaseContextModelSnapshot.cs index 48afb2c8..e1de451c 100644 --- a/Timeline/Migrations/DatabaseContextModelSnapshot.cs +++ b/Timeline/Migrations/DatabaseContextModelSnapshot.cs @@ -1,4 +1,4 @@ -// +// using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; @@ -16,7 +16,7 @@ namespace Timeline.Migrations .HasAnnotation("ProductVersion", "2.2.6-servicing-10079") .HasAnnotation("Relational:MaxIdentifierLength", 64); - modelBuilder.Entity("Timeline.Models.User", b => + modelBuilder.Entity("Timeline.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -28,18 +28,21 @@ namespace Timeline.Migrations b.Property("Name") .IsRequired() - .HasColumnName("name"); + .HasColumnName("name") + .HasMaxLength(26); b.Property("RoleString") .IsRequired() .HasColumnName("roles"); b.Property("Version") - .HasColumnName("version"); + .ValueGeneratedOnAdd() + .HasColumnName("version") + .HasDefaultValue(0L); b.HasKey("Id"); - b.ToTable("user"); + b.ToTable("users"); }); #pragma warning restore 612, 618 } -- cgit v1.2.3