aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Migrations/20190817094408_Enhance1.cs
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-08-17 17:56:01 +0800
committerGitHub <noreply@github.com>2019-08-17 17:56:01 +0800
commit7bbd66270597c7f6f07f1ab5ec6c45b3dcfa388e (patch)
treefb8a9ed7520287a6aad50d22cc64c75b3f687a2b /Timeline/Migrations/20190817094408_Enhance1.cs
parentf0754f0d5feca407d5a327e634a84a3380507bc2 (diff)
parent0038741bae4f0c42262db96ab81bd14c6f6a0993 (diff)
downloadtimeline-7bbd66270597c7f6f07f1ab5ec6c45b3dcfa388e.tar.gz
timeline-7bbd66270597c7f6f07f1ab5ec6c45b3dcfa388e.tar.bz2
timeline-7bbd66270597c7f6f07f1ab5ec6c45b3dcfa388e.zip
Merge pull request #41 from crupest/database
Enhance database.
Diffstat (limited to 'Timeline/Migrations/20190817094408_Enhance1.cs')
-rw-r--r--Timeline/Migrations/20190817094408_Enhance1.cs41
1 files changed, 41 insertions, 0 deletions
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<long>(
+ name: "version",
+ table: "user",
+ nullable: false,
+ defaultValue: 0L,
+ oldClrType: typeof(long));
+
+ migrationBuilder.AlterColumn<string>(
+ name: "name",
+ table: "user",
+ maxLength: 26,
+ nullable: false,
+ oldClrType: typeof(string));
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AlterColumn<long>(
+ name: "version",
+ table: "user",
+ nullable: false,
+ oldClrType: typeof(long),
+ oldDefaultValue: 0L);
+
+ migrationBuilder.AlterColumn<string>(
+ name: "name",
+ table: "user",
+ nullable: false,
+ oldClrType: typeof(string),
+ oldMaxLength: 26);
+ }
+ }
+}