30 lines
849 B
C#
30 lines
849 B
C#
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");
|
|
}
|
|
}
|
|
}
|