using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace FlexJobApi.Database.Migrations.Migrations { /// public partial class UpdateUser0818 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "UserManageIndustrialPark", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), UserId = table.Column(type: "uniqueidentifier", nullable: false), IndustrialParkId = table.Column(type: "uniqueidentifier", nullable: false), CreatedTime = table.Column(type: "datetimeoffset", nullable: false), UpdatedTime = table.Column(type: "datetimeoffset", nullable: true), Sort = table.Column(type: "int", nullable: false), TraceId = table.Column(type: "nvarchar(max)", nullable: true), CreatedUserId = table.Column(type: "uniqueidentifier", nullable: true), CreatedEnterpriseId = table.Column(type: "uniqueidentifier", nullable: true), UpdatedUserId = table.Column(type: "uniqueidentifier", nullable: true), IsDeleted = table.Column(type: "bit", nullable: false) }, constraints: table => { table.PrimaryKey("PK_UserManageIndustrialPark", x => x.Id); table.ForeignKey( name: "FK_UserManageIndustrialPark_User_UserId", column: x => x.UserId, principalTable: "User", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_UserManageIndustrialPark_UserId", table: "UserManageIndustrialPark", column: "UserId"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "UserManageIndustrialPark"); } } }