mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-20 11:06:06 +00:00
fix(db): set no deferred references once the move refused a value
Nothing is inserted after the first refused value, so the self-references held back had no rows to land on, and the move failed on them instead of listing the values (MOVE-006).
This commit is contained in:
@@ -187,7 +187,8 @@ async function copyAll(
|
||||
copied.push(result);
|
||||
};
|
||||
await inOrder(plan.specs, copyOne(source));
|
||||
await inOrder(copied, (table) => applyDeferred(trx, table));
|
||||
// Once a value was refused nothing more is inserted, so there are no rows to point at each other.
|
||||
if (refused === 0) await inOrder(copied, (table) => applyDeferred(trx, table));
|
||||
|
||||
const sequences: CopiedSequence[] = [...plan.sequences];
|
||||
const pluginTables = new Map<string, CopiedTable[]>();
|
||||
|
||||
Reference in New Issue
Block a user