mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 06:06:01 +00:00
renamed groupId => pairingId
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
import { TableInfo } from 'dbgate-types';
|
||||
import uuidv1 from 'uuid/v1';
|
||||
|
||||
export function generateTableGroupId(table: TableInfo): TableInfo {
|
||||
export function generateTablePairingId(table: TableInfo): TableInfo {
|
||||
if (!table) return table;
|
||||
if (!table.groupId) {
|
||||
if (!table.pairingId) {
|
||||
return {
|
||||
...table,
|
||||
columns: table.columns.map(col => ({
|
||||
...col,
|
||||
groupid: uuidv1(),
|
||||
pairingId: col.pairingId || uuidv1(),
|
||||
})),
|
||||
groupId: uuidv1(),
|
||||
pairingId: table.pairingId || uuidv1(),
|
||||
};
|
||||
}
|
||||
return table;
|
||||
|
||||
Reference in New Issue
Block a user