44 lines
1.6 KiB
C#
44 lines
1.6 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace RMuseum.Migrations
|
|
{
|
|
public partial class ProbableMetres : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "GanjoorPoemProbableMetres",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<int>(type: "int", nullable: false)
|
|
.Annotation("SqlServer:Identity", "1, 1"),
|
|
PoemId = table.Column<int>(type: "int", nullable: false),
|
|
Metre = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_GanjoorPoemProbableMetres", x => x.Id);
|
|
table.ForeignKey(
|
|
name: "FK_GanjoorPoemProbableMetres_GanjoorPoems_PoemId",
|
|
column: x => x.PoemId,
|
|
principalTable: "GanjoorPoems",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_GanjoorPoemProbableMetres_PoemId",
|
|
table: "GanjoorPoemProbableMetres",
|
|
column: "PoemId");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "GanjoorPoemProbableMetres");
|
|
}
|
|
}
|
|
}
|