This commit is contained in:
Jan Prochazka
2020-09-27 08:28:59 +02:00
parent 5fa36c40f2
commit 154a4fc7d9
4 changed files with 13 additions and 2 deletions

View File

@@ -0,0 +1,9 @@
import { TableInfo } from '@dbgate/types';
import _ from 'lodash';
export function prepareTableForImport(table: TableInfo): TableInfo {
const res = _.cloneDeep(table);
res.foreignKeys = [];
if (res.primaryKey) res.primaryKey.constraintName = null;
return res;
}