update file tài sản

This commit is contained in:
2026-09-21 10:06:27 +07:00
parent 2015c6fc16
commit a215b503c6
10 changed files with 1274 additions and 68 deletions

View File

@@ -0,0 +1,10 @@
const fs = require('node:fs');
const path = require('node:path');
async function ensureAssetArchiveSchema(pool) {
const migration = fs.readFileSync(path.join(__dirname, 'asset-archive-schema.sql'), 'utf8');
// Fail startup if preservation cannot be installed; partial migration rolls back.
await pool.request().batch(migration);
}
module.exports = { ensureAssetArchiveSchema };