mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-25 21:15:59 +00:00
deploy - update fixed data works in test
This commit is contained in:
@@ -623,7 +623,7 @@ export class SqlDumper implements AlterProcessor {
|
||||
was = true;
|
||||
this.put('^update %f ^set ', table);
|
||||
this.putCollection(', ', updated, col => this.put('%i=%v', col, row[col]));
|
||||
this.put(' ^ where ');
|
||||
this.put(' ^where ');
|
||||
this.putCollection(' ^and ', key, col => this.put('%i=%v', col, row[col]));
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -11,9 +11,9 @@ export async function enrichWithPreloadedRows(
|
||||
const repl = {};
|
||||
for (const tableTarget of dbTarget.tables) {
|
||||
const tableModel = dbModel.tables.find(x => x.pairingId == tableTarget.pairingId);
|
||||
if (tableModel.preloadedRows?.length || 0 == 0) continue;
|
||||
if ((tableModel.preloadedRows?.length || 0) == 0) continue;
|
||||
const keyColumns = tableModel.preloadedRowsKey || tableModel.primaryKey?.columns?.map(x => x.columnName);
|
||||
if (keyColumns?.length || 0 == 0) continue;
|
||||
if ((keyColumns?.length || 0) == 0) continue;
|
||||
const dmp = driver.createDumper();
|
||||
if (keyColumns.length == 1) {
|
||||
dmp.putCmd(
|
||||
|
||||
Reference in New Issue
Block a user