Swarm/DysonNetwork.Sphere/Migrations/20250502040651_RealmAndChat.cs
2025-05-02 12:07:09 +08:00

52 lines
1.6 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
using NodaTime;
#nullable disable
namespace DysonNetwork.Sphere.Migrations
{
/// <inheritdoc />
public partial class RealmAndChat : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Instant>(
name: "created_at",
table: "publisher_members",
type: "timestamp with time zone",
nullable: false,
defaultValue: NodaTime.Instant.FromUnixTimeTicks(0L));
migrationBuilder.AddColumn<Instant>(
name: "deleted_at",
table: "publisher_members",
type: "timestamp with time zone",
nullable: true);
migrationBuilder.AddColumn<Instant>(
name: "updated_at",
table: "publisher_members",
type: "timestamp with time zone",
nullable: false,
defaultValue: NodaTime.Instant.FromUnixTimeTicks(0L));
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "created_at",
table: "publisher_members");
migrationBuilder.DropColumn(
name: "deleted_at",
table: "publisher_members");
migrationBuilder.DropColumn(
name: "updated_at",
table: "publisher_members");
}
}
}