68 lines
2.3 KiB
C#
68 lines
2.3 KiB
C#
|
using System;
|
|||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace DataModel.Migrations
|
|||
|
{
|
|||
|
public partial class _202206AddSettings : Migration
|
|||
|
{
|
|||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.CreateTable(
|
|||
|
name: "Settings",
|
|||
|
columns: table => new
|
|||
|
{
|
|||
|
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|||
|
.Annotation("Sqlite:Autoincrement", true),
|
|||
|
Name = table.Column<string>(type: "TEXT", nullable: false),
|
|||
|
TextValue = table.Column<string>(type: "TEXT", nullable: false),
|
|||
|
BoolValue = table.Column<bool>(type: "INTEGER", nullable: false),
|
|||
|
IntegerValue = table.Column<int>(type: "INTEGER", nullable: false),
|
|||
|
GuidValue = table.Column<Guid>(type: "TEXT", nullable: false)
|
|||
|
},
|
|||
|
constraints: table =>
|
|||
|
{
|
|||
|
table.PrimaryKey("PK_Settings", x => x.Id);
|
|||
|
});
|
|||
|
|
|||
|
migrationBuilder.CreateIndex(
|
|||
|
name: "IX_Settings_BoolValue",
|
|||
|
table: "Settings",
|
|||
|
column: "BoolValue");
|
|||
|
|
|||
|
migrationBuilder.CreateIndex(
|
|||
|
name: "IX_Settings_GuidValue",
|
|||
|
table: "Settings",
|
|||
|
column: "GuidValue");
|
|||
|
|
|||
|
migrationBuilder.CreateIndex(
|
|||
|
name: "IX_Settings_Id",
|
|||
|
table: "Settings",
|
|||
|
column: "Id");
|
|||
|
|
|||
|
migrationBuilder.CreateIndex(
|
|||
|
name: "IX_Settings_IntegerValue",
|
|||
|
table: "Settings",
|
|||
|
column: "IntegerValue");
|
|||
|
|
|||
|
migrationBuilder.CreateIndex(
|
|||
|
name: "IX_Settings_Name",
|
|||
|
table: "Settings",
|
|||
|
column: "Name",
|
|||
|
unique: true);
|
|||
|
|
|||
|
migrationBuilder.CreateIndex(
|
|||
|
name: "IX_Settings_TextValue",
|
|||
|
table: "Settings",
|
|||
|
column: "TextValue");
|
|||
|
}
|
|||
|
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropTable(
|
|||
|
name: "Settings");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|