25 lines
711 B
C#
25 lines
711 B
C#
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace MiaoJiZhang.Infrastructure.Persistence.Migrations;
|
|
|
|
[DbContext(typeof(AppDbContext))]
|
|
[Migration("20260722040000_RepairRecognitionTimestamps")]
|
|
public partial class RepairRecognitionTimestamps : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.Sql("""
|
|
UPDATE Transactions
|
|
SET OccurredAt = CreatedAt
|
|
WHERE Source IN (5, 6, 7)
|
|
AND OccurredAt < '2000-01-01 00:00:00';
|
|
""");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
}
|
|
} |