Files
limanapp/LiMan.DB/Migrations/20240806142953_AddRelModel01.cs
2024-08-06 16:41:11 +02:00

46 lines
1.7 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LiMan.DB.Migrations
{
public partial class AddRelModel01 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Releases",
columns: table => new
{
IdxRel = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
CodApp = table.Column<string>(type: "nvarchar(50)", nullable: true),
VersNum = table.Column<string>(type: "nvarchar(max)", nullable: true),
VersText = table.Column<string>(type: "nvarchar(max)", nullable: true),
ReleaseDate = table.Column<DateTime>(type: "datetime", nullable: false, defaultValue: DateTime.Now, defaultValueSql: "GETDATE()")
},
constraints: table =>
{
table.PrimaryKey("PK_Releases", x => x.IdxRel);
table.ForeignKey(
name: "FK_Releases_Applicativi_CodApp",
column: x => x.CodApp,
principalTable: "Applicativi",
principalColumn: "CodApp");
});
migrationBuilder.CreateIndex(
name: "IX_Releases_CodApp",
table: "Releases",
column: "CodApp");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Releases");
}
}
}