mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-25 20:06:00 +00:00
better column mapping
This commit is contained in:
@@ -221,8 +221,10 @@
|
||||
onClick={() => {
|
||||
showModal(ColumnMapModal, {
|
||||
initialValue: $values[`columns_${row}`],
|
||||
sourceTableInfo: $sourceDbinfo?.tables?.find(x => x.pureName == row),
|
||||
targetTableInfo: $targetDbinfo?.tables?.find(x => x.pureName == values[`targetName_${row}`] || row),
|
||||
sourceTableInfo: $sourceDbinfo?.tables?.find(x => x.pureName?.toLowerCase() == row?.toLowerCase()),
|
||||
targetTableInfo: $targetDbinfo?.tables?.find(
|
||||
x => x.pureName?.toLowerCase() == (values[`targetName_${row}`] || row)?.toLowerCase()
|
||||
),
|
||||
onConfirm: value => setFieldValue(`columns_${row}`, value),
|
||||
});
|
||||
}}
|
||||
|
||||
@@ -27,6 +27,13 @@
|
||||
skip: false,
|
||||
}));
|
||||
}
|
||||
if (targetTableInfo && !sourceTableInfo) {
|
||||
return targetTableInfo.columns.map(x => ({
|
||||
src: x.columnName,
|
||||
dst: x.columnName,
|
||||
skip: false,
|
||||
}));
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user