mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 13:46:00 +00:00
This commit is contained in:
9
packages/tools/src/tableTransforms.ts
Normal file
9
packages/tools/src/tableTransforms.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user