update file tài sản
This commit is contained in:
10
backend/asset-archive-schema.js
Normal file
10
backend/asset-archive-schema.js
Normal 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 };
|
||||
Reference in New Issue
Block a user