Foxnouns.NET/Foxnouns.Backend/Database/Migrations/20240712233806_AddUserLastActive.cs

30 lines
820 B
C#

using Microsoft.EntityFrameworkCore.Migrations;
using NodaTime;
#nullable disable
namespace Foxnouns.Backend.Database.Migrations
{
/// <inheritdoc />
public partial class AddUserLastActive : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Instant>(
name: "last_active",
table: "users",
type: "timestamp with time zone",
nullable: false,
defaultValueSql: "now()");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "last_active",
table: "users");
}
}
}