aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Migrations/20190412153003_MakeColumnsInUserNotNull.cs
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-04-13 15:47:40 +0800
committerGitHub <noreply@github.com>2019-04-13 15:47:40 +0800
commit825778f4058d107186be66af05b1f8d16cd1e32c (patch)
tree1aa37565aad734b604eb94ed3a62db2308f4b30d /Timeline/Migrations/20190412153003_MakeColumnsInUserNotNull.cs
parent8c5e7069d2651fb6fae641dfe482d7a0910b3fd1 (diff)
parentc2b9b32ada535bb09ee06ab0dfc0a3405e12485a (diff)
downloadtimeline-825778f4058d107186be66af05b1f8d16cd1e32c.tar.gz
timeline-825778f4058d107186be66af05b1f8d16cd1e32c.tar.bz2
timeline-825778f4058d107186be66af05b1f8d16cd1e32c.zip
Merge pull request #20 from crupest/separate
Separate front end and back end.
Diffstat (limited to 'Timeline/Migrations/20190412153003_MakeColumnsInUserNotNull.cs')
-rw-r--r--Timeline/Migrations/20190412153003_MakeColumnsInUserNotNull.cs52
1 files changed, 52 insertions, 0 deletions
diff --git a/Timeline/Migrations/20190412153003_MakeColumnsInUserNotNull.cs b/Timeline/Migrations/20190412153003_MakeColumnsInUserNotNull.cs
new file mode 100644
index 00000000..0b7b5f08
--- /dev/null
+++ b/Timeline/Migrations/20190412153003_MakeColumnsInUserNotNull.cs
@@ -0,0 +1,52 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+namespace Timeline.Migrations
+{
+ public partial class MakeColumnsInUserNotNull : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AlterColumn<string>(
+ name: "roles",
+ table: "user",
+ nullable: false,
+ oldClrType: typeof(string),
+ oldNullable: true);
+
+ migrationBuilder.AlterColumn<string>(
+ name: "name",
+ table: "user",
+ nullable: false,
+ oldClrType: typeof(string),
+ oldNullable: true);
+
+ migrationBuilder.AlterColumn<string>(
+ name: "password",
+ table: "user",
+ nullable: false,
+ oldClrType: typeof(string),
+ oldNullable: true);
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AlterColumn<string>(
+ name: "roles",
+ table: "user",
+ nullable: true,
+ oldClrType: typeof(string));
+
+ migrationBuilder.AlterColumn<string>(
+ name: "name",
+ table: "user",
+ nullable: true,
+ oldClrType: typeof(string));
+
+ migrationBuilder.AlterColumn<string>(
+ name: "password",
+ table: "user",
+ nullable: true,
+ oldClrType: typeof(string));
+ }
+ }
+}