refactor: remove retired data format support
This commit is contained in:
@@ -64,7 +64,7 @@ const sourceOnlyTables = bundle.database.tables
|
||||
.map((table) => String(table.name))
|
||||
.filter((name) => !targetNames.has(name));
|
||||
if (sourceOnlyTables.length) {
|
||||
console.log(`Skipping source-only legacy tables: ${sourceOnlyTables.join(', ')}`);
|
||||
throw new Error(`Bootstrap snapshot contains tables outside the current target schema: ${sourceOnlyTables.join(', ')}`);
|
||||
}
|
||||
const quoteIdentifier = (identifier) => `"${String(identifier).replaceAll('"', '""')}"`;
|
||||
let restoredRows = 0;
|
||||
@@ -74,7 +74,7 @@ try {
|
||||
for (const row of [...targetTables].reverse()) {
|
||||
await database.exec(`DELETE FROM ${quoteIdentifier(row.name)}`);
|
||||
}
|
||||
for (const table of bundle.database.tables.filter((candidate) => targetNames.has(candidate.name))) {
|
||||
for (const table of bundle.database.tables) {
|
||||
for (const row of table.rows) {
|
||||
const columns = Object.keys(row);
|
||||
if (!columns.length) continue;
|
||||
|
||||
Reference in New Issue
Block a user