42 lines
1.6 KiB
C#
42 lines
1.6 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace Moonlight.Api.Database.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddedThemes : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "Themes",
|
|
schema: "core",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<int>(type: "integer", nullable: false)
|
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
|
Name = table.Column<string>(type: "character varying(30)", maxLength: 30, nullable: false),
|
|
Version = table.Column<string>(type: "character varying(30)", maxLength: 30, nullable: false),
|
|
Author = table.Column<string>(type: "character varying(30)", maxLength: 30, nullable: false),
|
|
IsEnabled = table.Column<bool>(type: "boolean", nullable: false),
|
|
CssContent = table.Column<string>(type: "character varying(20000)", maxLength: 20000, nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_Themes", x => x.Id);
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "Themes",
|
|
schema: "core");
|
|
}
|
|
}
|
|
}
|