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