Swarm/DysonNetwork.Sphere/Migrations/20250518123138_BetterLeavingChatAndRealm.cs

51 lines
1.4 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
using NodaTime;
#nullable disable
namespace DysonNetwork.Sphere.Migrations
{
/// <inheritdoc />
public partial class BetterLeavingChatAndRealm : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Instant>(
name: "leave_at",
table: "realm_members",
type: "timestamp with time zone",
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "is_community",
table: "chat_rooms",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<Instant>(
name: "leave_at",
table: "chat_members",
type: "timestamp with time zone",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "leave_at",
table: "realm_members");
migrationBuilder.DropColumn(
name: "is_community",
table: "chat_rooms");
migrationBuilder.DropColumn(
name: "leave_at",
table: "chat_members");
}
}
}