Files
webdoorcreator/WebDoorCreator.Data/Migrations/WDCData/20230403143539_VocabularyAndTempAdd.cs
2023-04-03 18:13:20 +02:00

48 lines
1.8 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WebDoorCreator.Data.Migrations.WDCData
{
public partial class VocabularyAndTempAdd : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Vocabulary",
columns: table => new
{
Lingua = table.Column<string>(type: "nvarchar(5)", maxLength: 5, nullable: false),
Lemma = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Traduzione = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Vocabulary", x => new { x.Lingua, x.Lemma });
});
migrationBuilder.CreateTable(
name: "VocabularyTemp",
columns: table => new
{
Lingua = table.Column<string>(type: "nvarchar(5)", maxLength: 5, nullable: false),
Lemma = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Traduzione = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_VocabularyTemp", x => new { x.Lingua, x.Lemma });
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Vocabulary");
migrationBuilder.DropTable(
name: "VocabularyTemp");
}
}
}