reduce dbgate-tools package size

This commit is contained in:
Jan Prochazka
2020-11-24 19:06:05 +01:00
parent 5862a2cdc4
commit 556a35f4ba
7 changed files with 27 additions and 30 deletions

View File

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