49 lines
1.8 KiB
C#
49 lines
1.8 KiB
C#
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
|
|||
|
namespace SharedLibraryCore.Migrations
|
|||
|
{
|
|||
|
public partial class AddClientMeta : Migration
|
|||
|
{
|
|||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.CreateTable(
|
|||
|
name: "EFMeta",
|
|||
|
columns: table => new
|
|||
|
{
|
|||
|
MetaId = table.Column<int>(nullable: false)
|
|||
|
.Annotation("Sqlite:Autoincrement", true),
|
|||
|
Active = table.Column<bool>(nullable: false),
|
|||
|
ClientId = table.Column<int>(nullable: false),
|
|||
|
Created = table.Column<DateTime>(nullable: false),
|
|||
|
Extra = table.Column<string>(nullable: true),
|
|||
|
Key = table.Column<string>(nullable: false),
|
|||
|
Updated = table.Column<DateTime>(nullable: false),
|
|||
|
Value = table.Column<string>(nullable: false)
|
|||
|
},
|
|||
|
constraints: table =>
|
|||
|
{
|
|||
|
table.PrimaryKey("PK_EFMeta", x => x.MetaId);
|
|||
|
table.ForeignKey(
|
|||
|
name: "FK_EFMeta_EFClients_ClientId",
|
|||
|
column: x => x.ClientId,
|
|||
|
principalTable: "EFClients",
|
|||
|
principalColumn: "ClientId",
|
|||
|
onDelete: ReferentialAction.Cascade);
|
|||
|
});
|
|||
|
|
|||
|
migrationBuilder.CreateIndex(
|
|||
|
name: "IX_EFMeta_ClientId",
|
|||
|
table: "EFMeta",
|
|||
|
column: "ClientId");
|
|||
|
}
|
|||
|
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropTable(
|
|||
|
name: "EFMeta");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|