feat(collections): 自动同步作品交付集验收状态
This commit is contained in:
@@ -21,7 +21,8 @@ try {
|
||||
await client.connect();
|
||||
const schema = fs.readFileSync(path.resolve('db/postgres/schema.sql'), 'utf8')
|
||||
.replace(/^BEGIN;|COMMIT;$/gm, '')
|
||||
.replace(/CREATE UNIQUE INDEX IF NOT EXISTS one_active_storage_config[^;]+;/, '');
|
||||
.replace(/CREATE UNIQUE INDEX IF NOT EXISTS one_active_storage_config[^;]+;/, '')
|
||||
.replace(/-- COLLECTION_STATUS_REPAIR_START[\s\S]+?-- COLLECTION_STATUS_REPAIR_END/, '');
|
||||
await client.query(schema);
|
||||
for (const table of tables) {
|
||||
const exists = sqlite.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name=?").get(table);
|
||||
|
||||
Reference in New Issue
Block a user