dbgate/packages/tools/src/tableTransforms.ts

10 lines
270 B
TypeScript
Raw Normal View History

import { TableInfo } from 'dbgate-types';
2020-09-27 06:28:59 +00:00
import _ from 'lodash';
export function prepareTableForImport(table: TableInfo): TableInfo {
const res = _.cloneDeep(table);
res.foreignKeys = [];
if (res.primaryKey) res.primaryKey.constraintName = null;
return res;
}