Foxchat.NET/Foxchat.Chat/Migrations/20240521191115_AddLastFetchedAtToUsers.cs

31 lines
849 B
C#
Raw Permalink Normal View History

2024-05-21 21:21:34 +02:00
using Microsoft.EntityFrameworkCore.Migrations;
using NodaTime;
#nullable disable
namespace Foxchat.Chat.Migrations
{
/// <inheritdoc />
public partial class AddLastFetchedAtToUsers : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Instant>(
name: "last_fetched_at",
table: "users",
type: "timestamp with time zone",
nullable: false,
defaultValue: NodaTime.Instant.FromUnixTimeTicks(0L));
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "last_fetched_at",
table: "users");
}
}
}