| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- using System;
- using Microsoft.EntityFrameworkCore.Migrations;
-
- #nullable disable
-
- namespace Diligent.WebAPI.Data.Migrations
- {
- public partial class AddedPattern : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "Patterns",
- columns: table => new
- {
- Id = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- Title = table.Column<string>(type: "nvarchar(max)", nullable: false),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- SelectionLevelId = table.Column<int>(type: "int", nullable: false),
- Message = table.Column<string>(type: "nvarchar(max)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Patterns", x => x.Id);
- table.ForeignKey(
- name: "FK_Patterns_SelectionLevels_SelectionLevelId",
- column: x => x.SelectionLevelId,
- principalTable: "SelectionLevels",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateIndex(
- name: "IX_Patterns_SelectionLevelId",
- table: "Patterns",
- column: "SelectionLevelId");
- }
-
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "Patterns");
- }
- }
- }
|