From e19f567dd61cecdd738a6eacdd073a097f66e36b Mon Sep 17 00:00:00 2001 From: 杨宇千 Date: Sat, 17 Aug 2019 17:47:11 +0800 Subject: Enhance database. --- Timeline/Migrations/20190817094408_Enhance1.cs | 41 ++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Timeline/Migrations/20190817094408_Enhance1.cs (limited to 'Timeline/Migrations/20190817094408_Enhance1.cs') diff --git a/Timeline/Migrations/20190817094408_Enhance1.cs b/Timeline/Migrations/20190817094408_Enhance1.cs new file mode 100644 index 00000000..0eae3ef9 --- /dev/null +++ b/Timeline/Migrations/20190817094408_Enhance1.cs @@ -0,0 +1,41 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Timeline.Migrations +{ + public partial class Enhance1 : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "version", + table: "user", + nullable: false, + defaultValue: 0L, + oldClrType: typeof(long)); + + migrationBuilder.AlterColumn( + name: "name", + table: "user", + maxLength: 26, + nullable: false, + oldClrType: typeof(string)); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "version", + table: "user", + nullable: false, + oldClrType: typeof(long), + oldDefaultValue: 0L); + + migrationBuilder.AlterColumn( + name: "name", + table: "user", + nullable: false, + oldClrType: typeof(string), + oldMaxLength: 26); + } + } +} -- cgit v1.2.3