using System; using Microsoft.EntityFrameworkCore.Migrations; namespace APT.Data.Migrations.Migrations { public partial class wjn2024012901 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "T_OP_ALLUSER"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "T_OP_ALLUSER", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CODE = table.Column(type: "nvarchar(30)", maxLength: 30, nullable: true), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), IS_DELETED = table.Column(type: "bit", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), PHONE = table.Column(type: "nvarchar(30)", maxLength: 30, nullable: true), TENANT = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_OP_ALLUSER", x => x.ID); table.ForeignKey( name: "FK_T_OP_ALLUSER_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateIndex( name: "IX_T_OP_ALLUSER_ORG_ID", table: "T_OP_ALLUSER", column: "ORG_ID"); } } }