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.ApiServer.Database.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddedThemes : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "Core_Themes",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<int>(type: "integer", nullable: false)
|
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
|
IsEnabled = table.Column<bool>(type: "boolean", nullable: false),
|
|
Name = table.Column<string>(type: "text", nullable: false),
|
|
Author = table.Column<string>(type: "text", nullable: false),
|
|
Version = table.Column<string>(type: "text", nullable: false),
|
|
UpdateUrl = table.Column<string>(type: "text", nullable: true),
|
|
DonateUrl = table.Column<string>(type: "text", nullable: true),
|
|
Content = table.Column<string>(type: "jsonb", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_Core_Themes", x => x.Id);
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "Core_Themes");
|
|
}
|
|
}
|
|
}
|