mirror of
https://github.com/dbgate/dbgate
synced 2024-11-08 12:47:25 +00:00
10 lines
288 B
TypeScript
10 lines
288 B
TypeScript
import { TableInfo } from 'dbgate-types';
|
|
import _cloneDeep from 'lodash/cloneDeep';
|
|
|
|
export function prepareTableForImport(table: TableInfo): TableInfo {
|
|
const res = _cloneDeep(table);
|
|
res.foreignKeys = [];
|
|
if (res.primaryKey) res.primaryKey.constraintName = null;
|
|
return res;
|
|
}
|