From 4c52f2d8b7aae43f391f54fb67fe91b8bc64e0c5 Mon Sep 17 00:00:00 2001 From: 杨宇千 Date: Mon, 21 Oct 2019 17:47:16 +0800 Subject: ... --- .../Migrations/20190822072156_AddUserDetail.cs | 47 ---------------------- 1 file changed, 47 deletions(-) delete mode 100644 Timeline/Migrations/20190822072156_AddUserDetail.cs (limited to 'Timeline/Migrations/20190822072156_AddUserDetail.cs') diff --git a/Timeline/Migrations/20190822072156_AddUserDetail.cs b/Timeline/Migrations/20190822072156_AddUserDetail.cs deleted file mode 100644 index 4aa6446b..00000000 --- a/Timeline/Migrations/20190822072156_AddUserDetail.cs +++ /dev/null @@ -1,47 +0,0 @@ -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace Timeline.Migrations -{ - public partial class AddUserDetail : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "user_details", - columns: table => new - { - id = table.Column(nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - nickname = table.Column(maxLength: 15, nullable: true), - qq = table.Column(maxLength: 15, nullable: true), - email = table.Column(maxLength: 50, nullable: true), - phone_number = table.Column(maxLength: 15, nullable: true), - description = table.Column(nullable: true), - UserId = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_user_details", x => x.id); - table.ForeignKey( - name: "FK_user_details_users_UserId", - column: x => x.UserId, - principalTable: "users", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_user_details_UserId", - table: "user_details", - column: "UserId", - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "user_details"); - } - } -} -- cgit v1.2.3