170 lines
8.9 KiB
C#
170 lines
8.9 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace APT.Data.Migrations.Migrations
|
|
{
|
|
public partial class wyw2026042302 : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "T_PF_BIPLAY_SET",
|
|
columns: table => new
|
|
{
|
|
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
V_ISAUTO = table.Column<bool>(type: "bit", nullable: false),
|
|
V_ISRE = table.Column<bool>(type: "bit", nullable: false),
|
|
V_ISSILENT = table.Column<bool>(type: "bit", nullable: false),
|
|
V_ISSHOWCONTROL = table.Column<bool>(type: "bit", nullable: false),
|
|
IMG_TIMESPAN = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
|
IMG_ISRE = table.Column<bool>(type: "bit", nullable: false),
|
|
IMG_EFFECT = table.Column<int>(type: "int", nullable: false),
|
|
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
|
|
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
|
|
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
|
|
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
|
|
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_T_PF_BIPLAY_SET", x => x.ID);
|
|
table.ForeignKey(
|
|
name: "FK_T_PF_BIPLAY_SET_T_FM_ORGANIZATION_ORG_ID",
|
|
column: x => x.ORG_ID,
|
|
principalTable: "T_FM_ORGANIZATION",
|
|
principalColumn: "ID",
|
|
onDelete: ReferentialAction.Restrict);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "T_PF_BIVIDEOIMG",
|
|
columns: table => new
|
|
{
|
|
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
TITLE = table.Column<string>(type: "nvarchar(300)", maxLength: 300, nullable: true),
|
|
DESCRIBE = table.Column<string>(type: "nvarchar(600)", maxLength: 600, nullable: true),
|
|
TYPE = table.Column<int>(type: "int", nullable: false),
|
|
STATUS = table.Column<int>(type: "int", nullable: false),
|
|
USER_ID_CREATER = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
|
|
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
|
|
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
|
|
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
|
|
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_T_PF_BIVIDEOIMG", x => x.ID);
|
|
table.ForeignKey(
|
|
name: "FK_T_PF_BIVIDEOIMG_T_FM_ORGANIZATION_ORG_ID",
|
|
column: x => x.ORG_ID,
|
|
principalTable: "T_FM_ORGANIZATION",
|
|
principalColumn: "ID",
|
|
onDelete: ReferentialAction.Restrict);
|
|
table.ForeignKey(
|
|
name: "FK_T_PF_BIVIDEOIMG_T_FM_USER_USER_ID_CREATER",
|
|
column: x => x.USER_ID_CREATER,
|
|
principalTable: "T_FM_USER",
|
|
principalColumn: "ID",
|
|
onDelete: ReferentialAction.Restrict);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "T_PF_BIVIDEOIMG_FILE",
|
|
columns: table => new
|
|
{
|
|
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
VIDEOIMG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
|
|
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
|
|
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
|
|
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
|
|
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_T_PF_BIVIDEOIMG_FILE", x => x.ID);
|
|
table.ForeignKey(
|
|
name: "FK_T_PF_BIVIDEOIMG_FILE_T_FM_ORGANIZATION_ORG_ID",
|
|
column: x => x.ORG_ID,
|
|
principalTable: "T_FM_ORGANIZATION",
|
|
principalColumn: "ID",
|
|
onDelete: ReferentialAction.Restrict);
|
|
table.ForeignKey(
|
|
name: "FK_T_PF_BIVIDEOIMG_FILE_T_PF_BIVIDEOIMG_VIDEOIMG_ID",
|
|
column: x => x.VIDEOIMG_ID,
|
|
principalTable: "T_PF_BIVIDEOIMG",
|
|
principalColumn: "ID",
|
|
onDelete: ReferentialAction.Restrict);
|
|
table.ForeignKey(
|
|
name: "FK_T_PF_BIVIDEOIMG_FILE_T_PF_IMG_FILE_IMG_FILE_ID",
|
|
column: x => x.IMG_FILE_ID,
|
|
principalTable: "T_PF_IMG_FILE",
|
|
principalColumn: "ID",
|
|
onDelete: ReferentialAction.Restrict);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_T_PF_BIPLAY_SET_ORG_ID",
|
|
table: "T_PF_BIPLAY_SET",
|
|
column: "ORG_ID");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_T_PF_BIVIDEOIMG_ORG_ID",
|
|
table: "T_PF_BIVIDEOIMG",
|
|
column: "ORG_ID");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_T_PF_BIVIDEOIMG_USER_ID_CREATER",
|
|
table: "T_PF_BIVIDEOIMG",
|
|
column: "USER_ID_CREATER");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_T_PF_BIVIDEOIMG_FILE_IMG_FILE_ID",
|
|
table: "T_PF_BIVIDEOIMG_FILE",
|
|
column: "IMG_FILE_ID");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_T_PF_BIVIDEOIMG_FILE_ORG_ID",
|
|
table: "T_PF_BIVIDEOIMG_FILE",
|
|
column: "ORG_ID");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_T_PF_BIVIDEOIMG_FILE_VIDEOIMG_ID",
|
|
table: "T_PF_BIVIDEOIMG_FILE",
|
|
column: "VIDEOIMG_ID");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "T_PF_BIPLAY_SET");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "T_PF_BIVIDEOIMG_FILE");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "T_PF_BIVIDEOIMG");
|
|
}
|
|
}
|
|
}
|