This commit is contained in:
@@ -143,7 +143,24 @@ export const migrations: readonly Migration[] = [
|
||||
mode: 'foreign-keys-off',
|
||||
run: migrateModeratorRole
|
||||
},
|
||||
{ version: 26, name: 'player moderation records and enforcement', run: migrateModeration }
|
||||
{ version: 26, name: 'player moderation records and enforcement', run: migrateModeration },
|
||||
{
|
||||
version: 27,
|
||||
name: 'moderation runtime sessions and evidence lookup',
|
||||
run: (handle) => {
|
||||
handle.exec(
|
||||
'CREATE INDEX IF NOT EXISTS moderation_evidence_case ON moderation_evidence(case_id)'
|
||||
);
|
||||
if (
|
||||
!(handle.pragma('table_info(moderation_runtimes)') as { name: string }[]).some(
|
||||
(c) => c.name === 'session_sequence'
|
||||
)
|
||||
)
|
||||
handle.exec(
|
||||
'ALTER TABLE moderation_runtimes ADD COLUMN session_sequence INTEGER NOT NULL DEFAULT 0'
|
||||
);
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
export const databaseVersion = migrations.length;
|
||||
|
||||
Reference in New Issue
Block a user