This commit is contained in:
Jan Prochazka 2023-02-12 12:31:38 +01:00
parent d1e1b2ce9c
commit 10d5667c83

View File

@ -101,11 +101,8 @@ class Dumper extends SqlDumper {
} }
selectScopeIdentity(table) { selectScopeIdentity(table) {
this.put( const column = table.columns?.find(x => x.autoIncrement);
"^SELECT currval(pg_get_serial_sequence('%f','%s'))", this.put("^SELECT currval(pg_get_serial_sequence('%f','%s'))", table, column ? column.columnName : null);
table,
table.columns?.find(x => x.autoIncrement)?.[0]?.columnName
);
} }
} }