53 lines
2.4 KiB
C#
53 lines
2.4 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace CompanyManagment.EFCore.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddInstitutionContractContactInfoTemp : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "InstitutionContractContactInfoTemp",
|
|
columns: table => new
|
|
{
|
|
id = table.Column<long>(type: "bigint", nullable: false)
|
|
.Annotation("SqlServer:Identity", "1, 1"),
|
|
PhoneType = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
|
|
InstitutionContractTempId = table.Column<long>(type: "bigint", nullable: false),
|
|
Position = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
|
|
PhoneNumber = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
|
|
FullName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
|
|
SendSms = table.Column<bool>(type: "bit", nullable: false),
|
|
CreationDate = table.Column<DateTime>(type: "datetime2", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_InstitutionContractContactInfoTemp", x => x.id);
|
|
table.ForeignKey(
|
|
name: "FK_InstitutionContractContactInfoTemp_InstitutionContractTemps_InstitutionContractTempId",
|
|
column: x => x.InstitutionContractTempId,
|
|
principalTable: "InstitutionContractTemps",
|
|
principalColumn: "id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_InstitutionContractContactInfoTemp_InstitutionContractTempId",
|
|
table: "InstitutionContractContactInfoTemp",
|
|
column: "InstitutionContractTempId");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "InstitutionContractContactInfoTemp");
|
|
}
|
|
}
|
|
}
|