mirror of
https://github.com/screentinker/screentinker.git
synced 2026-08-16 23:33:10 -06:00
1
This commit is contained in:
parent
93fc5021a1
commit
e1b444f252
|
|
@ -57,12 +57,13 @@ function ensureMultitenancyMigration() {
|
||||||
console.warn(`[boot] Pre-migration snapshot: ${snapshotPath}`);
|
console.warn(`[boot] Pre-migration snapshot: ${snapshotPath}`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(`[boot] Snapshot failed: ${e.message}`);
|
console.error(`[boot] Snapshot failed: ${e.message}`);
|
||||||
process.exit(1);
|
if (!e.message.includes('Sqlite3UnsupportedStatement')) process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const { runMigration } = require('../../scripts/migrate-multitenancy');
|
const { runMigration } = require('../../scripts/migrate-multitenancy');
|
||||||
runMigration({ db });
|
runMigration({ db });
|
||||||
|
if (dbOptions.syncUrl) db.sync();
|
||||||
console.warn('[boot] Migration complete, continuing startup');
|
console.warn('[boot] Migration complete, continuing startup');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(`[boot] Migration FAILED: ${e.message}`);
|
console.error(`[boot] Migration FAILED: ${e.message}`);
|
||||||
|
|
@ -781,7 +782,7 @@ function backfillPlaylistItemsZoneId() {
|
||||||
console.warn(`[zone-id backfill] Pre-migration snapshot: ${snapshotPath}`);
|
console.warn(`[zone-id backfill] Pre-migration snapshot: ${snapshotPath}`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(`[zone-id backfill] Snapshot failed: ${e.message}`);
|
console.error(`[zone-id backfill] Snapshot failed: ${e.message}`);
|
||||||
process.exit(1);
|
if (!e.message.includes('Sqlite3UnsupportedStatement')) process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
@ -877,7 +878,7 @@ const { applyTenantDeleteCascade } = require('../lib/tenant-cascade-migration');
|
||||||
snapped = true;
|
snapped = true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(`[tenant-cascade] Snapshot failed: ${e.message}`);
|
console.error(`[tenant-cascade] Snapshot failed: ${e.message}`);
|
||||||
process.exit(1);
|
if (!e.message.includes('Sqlite3UnsupportedStatement')) process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Reference in a new issue