Iceshrimp.NET/Iceshrimp.Backend/Core/Database/Migrations/20240207164121_AddFederationControl.cs
2024-02-07 17:52:41 +01:00

49 lines
1.7 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Iceshrimp.Backend.Core.Database.Migrations
{
/// <inheritdoc />
public partial class AddFederationControl : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "allowed_instance",
columns: table => new
{
host = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false),
imported = table.Column<bool>(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_allowed_instance", x => x.host);
});
migrationBuilder.CreateTable(
name: "blocked_instance",
columns: table => new
{
host = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false),
reason = table.Column<string>(type: "character varying(1024)", maxLength: 1024, nullable: true),
imported = table.Column<bool>(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_blocked_instance", x => x.host);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "allowed_instance");
migrationBuilder.DropTable(
name: "blocked_instance");
}
}
}