I18NCommander/I18N Commander/DataModel/Migrations/20220709094035_202207AddSectionDataKey.cs
Thorsten Sommer c90d3fdd3c
Changed section data model
- Made parents nullable
- Added a data key for the tree
- Added depth for quicker layer-wise loading
2022-07-09 15:03:18 +02:00

36 lines
1003 B
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace DataModel.Migrations
{
public partial class _202207AddSectionDataKey : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "DataKey",
table: "Sections",
type: "TEXT",
nullable: false,
defaultValue: "");
migrationBuilder.CreateIndex(
name: "IX_Sections_DataKey",
table: "Sections",
column: "DataKey");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_Sections_DataKey",
table: "Sections");
migrationBuilder.DropColumn(
name: "DataKey",
table: "Sections");
}
}
}