c6dfa7915b
- gestione LogCodImp - migrazione
59 lines
2.2 KiB
C#
59 lines
2.2 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace LiMan.DB.Migrations
|
|
{
|
|
public partial class AddLogCodImp : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "LogCodImp",
|
|
columns: table => new
|
|
{
|
|
IdxLogCodImp = table.Column<int>(type: "int", nullable: false)
|
|
.Annotation("SqlServer:Identity", "1, 1"),
|
|
IdxLic = table.Column<int>(type: "int", nullable: false),
|
|
IdxSubLic = table.Column<int>(type: "int", nullable: false),
|
|
CodApp = table.Column<string>(type: "nvarchar(50)", nullable: true),
|
|
CodImpOld = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
CodImpNew = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
DtMod = table.Column<DateTime>(type: "datetime2", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_LogCodImp", x => x.IdxLogCodImp);
|
|
table.ForeignKey(
|
|
name: "FK_LogCodImp_Applicativi_CodApp",
|
|
column: x => x.CodApp,
|
|
principalTable: "Applicativi",
|
|
principalColumn: "CodApp");
|
|
table.ForeignKey(
|
|
name: "FK_LogCodImp_Licenze_IdxLic",
|
|
column: x => x.IdxLic,
|
|
principalTable: "Licenze",
|
|
principalColumn: "IdxLic",
|
|
onDelete: ReferentialAction.Cascade);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_LogCodImp_CodApp",
|
|
table: "LogCodImp",
|
|
column: "CodApp");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_LogCodImp_IdxLic",
|
|
table: "LogCodImp",
|
|
column: "IdxLic");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "LogCodImp");
|
|
}
|
|
}
|
|
}
|