using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Nuuru.Server.Migrations
{
///
public partial class AddAnonymousSupport : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn(
name: "IpAddress",
table: "BooruPosts",
type: "TEXT",
nullable: true);
migrationBuilder.AddColumn(
name: "IpAddress",
table: "BooruComments",
type: "TEXT",
nullable: true);
migrationBuilder.AddColumn(
name: "IsSystemAccount",
table: "AspNetUsers",
type: "INTEGER",
nullable: false,
defaultValue: false);
migrationBuilder.CreateTable(
name: "SiteSettings",
columns: table => new
{
Key = table.Column(type: "TEXT", maxLength: 255, nullable: false),
Value = table.Column(type: "TEXT", maxLength: 4000, nullable: false),
UpdatedAt = table.Column(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_SiteSettings", x => x.Key);
});
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "SiteSettings");
migrationBuilder.DropColumn(
name: "IpAddress",
table: "BooruPosts");
migrationBuilder.DropColumn(
name: "IpAddress",
table: "BooruComments");
migrationBuilder.DropColumn(
name: "IsSystemAccount",
table: "AspNetUsers");
}
}
}