This commit is contained in:
seb
2026-07-31 00:08:50 +02:00
parent 93e52cd513
commit 6bdac7e543
17 changed files with 520 additions and 24 deletions

12
src/store/initialize.js Normal file
View File

@@ -0,0 +1,12 @@
import { SCHEMA_SCRIPTS } from '../schema.js';
import purge from './purge.js';
export default function initialize(pool) {
const doPurge = purge(pool);
return async () => {
await doPurge();
for (const script of SCHEMA_SCRIPTS) {
await pool.request().query(script);
}
};
}