101 lines
3.4 KiB
C#
101 lines
3.4 KiB
C#
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|
|||
|
|
namespace APT.Data.Migrations.Migrations
|
|||
|
|
{
|
|||
|
|
public partial class hmr2025112202 : Migration
|
|||
|
|
{
|
|||
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
|
{
|
|||
|
|
migrationBuilder.AlterColumn<string>(
|
|||
|
|
name: "SAFE_USER_PHONE",
|
|||
|
|
table: "T_OG_RELATED",
|
|||
|
|
type: "nvarchar(50)",
|
|||
|
|
maxLength: 50,
|
|||
|
|
nullable: true,
|
|||
|
|
oldClrType: typeof(int),
|
|||
|
|
oldType: "int",
|
|||
|
|
oldMaxLength: 11,
|
|||
|
|
oldNullable: true);
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<string>(
|
|||
|
|
name: "USER_PHONE",
|
|||
|
|
table: "T_FO_FIRE_JOB_WB",
|
|||
|
|
type: "nvarchar(50)",
|
|||
|
|
maxLength: 50,
|
|||
|
|
nullable: true,
|
|||
|
|
oldClrType: typeof(int),
|
|||
|
|
oldType: "int",
|
|||
|
|
oldMaxLength: 11,
|
|||
|
|
oldNullable: true);
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<string>(
|
|||
|
|
name: "SAFE_USER_PHONE",
|
|||
|
|
table: "T_FO_FIRE_JOB_WB",
|
|||
|
|
type: "nvarchar(50)",
|
|||
|
|
maxLength: 50,
|
|||
|
|
nullable: true,
|
|||
|
|
oldClrType: typeof(int),
|
|||
|
|
oldType: "int",
|
|||
|
|
oldMaxLength: 11,
|
|||
|
|
oldNullable: true);
|
|||
|
|
|
|||
|
|
migrationBuilder.CreateIndex(
|
|||
|
|
name: "IX_T_FO_FIRE_JOB_WB_RELATED_ID",
|
|||
|
|
table: "T_FO_FIRE_JOB_WB",
|
|||
|
|
column: "RELATED_ID");
|
|||
|
|
|
|||
|
|
migrationBuilder.AddForeignKey(
|
|||
|
|
name: "FK_T_FO_FIRE_JOB_WB_T_OG_RELATED_RELATED_ID",
|
|||
|
|
table: "T_FO_FIRE_JOB_WB",
|
|||
|
|
column: "RELATED_ID",
|
|||
|
|
principalTable: "T_OG_RELATED",
|
|||
|
|
principalColumn: "ID",
|
|||
|
|
onDelete: ReferentialAction.Restrict);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
|
{
|
|||
|
|
migrationBuilder.DropForeignKey(
|
|||
|
|
name: "FK_T_FO_FIRE_JOB_WB_T_OG_RELATED_RELATED_ID",
|
|||
|
|
table: "T_FO_FIRE_JOB_WB");
|
|||
|
|
|
|||
|
|
migrationBuilder.DropIndex(
|
|||
|
|
name: "IX_T_FO_FIRE_JOB_WB_RELATED_ID",
|
|||
|
|
table: "T_FO_FIRE_JOB_WB");
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<int>(
|
|||
|
|
name: "SAFE_USER_PHONE",
|
|||
|
|
table: "T_OG_RELATED",
|
|||
|
|
type: "int",
|
|||
|
|
maxLength: 11,
|
|||
|
|
nullable: true,
|
|||
|
|
oldClrType: typeof(string),
|
|||
|
|
oldType: "nvarchar(50)",
|
|||
|
|
oldMaxLength: 50,
|
|||
|
|
oldNullable: true);
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<int>(
|
|||
|
|
name: "USER_PHONE",
|
|||
|
|
table: "T_FO_FIRE_JOB_WB",
|
|||
|
|
type: "int",
|
|||
|
|
maxLength: 11,
|
|||
|
|
nullable: true,
|
|||
|
|
oldClrType: typeof(string),
|
|||
|
|
oldType: "nvarchar(50)",
|
|||
|
|
oldMaxLength: 50,
|
|||
|
|
oldNullable: true);
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<int>(
|
|||
|
|
name: "SAFE_USER_PHONE",
|
|||
|
|
table: "T_FO_FIRE_JOB_WB",
|
|||
|
|
type: "int",
|
|||
|
|
maxLength: 11,
|
|||
|
|
nullable: true,
|
|||
|
|
oldClrType: typeof(string),
|
|||
|
|
oldType: "nvarchar(50)",
|
|||
|
|
oldMaxLength: 50,
|
|||
|
|
oldNullable: true);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|