feat: migrate legacy long-lived database records

This commit is contained in:
2026-07-27 01:12:00 +00:00
parent d8220a18b3
commit 89013272e1
39 changed files with 2495 additions and 124 deletions
@@ -218,10 +218,11 @@ integration('monthly pre-update persistence', () => {
]);
const yearbookRow = await db.yearbookHistory.findUniqueOrThrow({
where: {
profileName_year_month: {
profileName_year_month_sourceId: {
profileName: yearbookProfile,
year: 200,
month: 12,
sourceId: 0,
},
},
});
@@ -361,7 +361,7 @@ integration('monthly wandering nation persistence', () => {
})
).toBe(0);
const archive = await db.oldNation.findUniqueOrThrow({
where: { serverId_nation: { serverId, nation: nationIds[1]! } },
where: { serverId_nation_sourceId: { serverId, nation: nationIds[1]!, sourceId: 0 } },
});
expect(archive.data).toMatchObject({
nation: nationIds[1],