Make AppState seed deterministic and update migration
This commit is contained in:
33
Data/Migrations/20260128134822_DeterministicAppStateSeed.cs
Normal file
33
Data/Migrations/20260128134822_DeterministicAppStateSeed.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GameList.Data.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class DeterministicAppStateSeed : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.UpdateData(
|
||||
table: "AppState",
|
||||
keyColumn: "Id",
|
||||
keyValue: 1,
|
||||
column: "UpdatedAt",
|
||||
value: new DateTimeOffset(new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.UpdateData(
|
||||
table: "AppState",
|
||||
keyColumn: "Id",
|
||||
keyValue: 1,
|
||||
column: "UpdatedAt",
|
||||
value: new DateTimeOffset(new DateTime(2026, 1, 28, 13, 46, 23, 267, DateTimeKind.Unspecified).AddTicks(1749), new TimeSpan(0, 0, 0, 0, 0)));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user