using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace bitforum.Migrations.DefaultDb
{
///
public partial class AddConfigTable : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Config",
columns: table => new
{
ID = table.Column(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Key = table.Column(type: "nvarchar(450)", nullable: false),
Value = table.Column(type: "nvarchar(max)", nullable: true),
Description = table.Column(type: "nvarchar(max)", nullable: true),
CreatedAt = table.Column(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Config", x => x.ID);
});
migrationBuilder.CreateIndex(
name: "IX_Config_Key",
table: "Config",
column: "Key",
unique: true);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Config");
}
}
}