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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), CodApp = table.Column(type: "nvarchar(50)", nullable: true), VersNum = table.Column(type: "nvarchar(max)", nullable: true), VersText = table.Column(type: "nvarchar(max)", nullable: true), ReleaseDate = table.Column(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"); } } }