aggiunto modello lingue
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class AddLanguagePack : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Languages",
|
||||
columns: table => new
|
||||
{
|
||||
CodLingua = table.Column<string>(type: "nvarchar(5)", maxLength: 5, nullable: false),
|
||||
DescrizioneLingua = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Languages", x => x.CodLingua);
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Languages",
|
||||
columns: new[] { "CodLingua", "DescrizioneLingua" },
|
||||
values: new object[] { "EN", "English" });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Languages",
|
||||
columns: new[] { "CodLingua", "DescrizioneLingua" },
|
||||
values: new object[] { "IT", "Italiano" });
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Languages");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user