mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-07 18:00:25 +08:00
refactor:
1.修改表后,刷新表数据 2.修改索引sql拼接bug 3.暂时只有mysql支持编辑表
This commit is contained in:
@@ -340,6 +340,7 @@ const submit = async () => {
|
||||
db: props.db,
|
||||
runSuccessCallback: () => {
|
||||
proxy.$parent.openEditTable({ tableName: state.tableData.tableName });
|
||||
proxy.$parent.refreshTableInfo();
|
||||
// cancel();
|
||||
},
|
||||
});
|
||||
@@ -507,7 +508,9 @@ const genSql = () => {
|
||||
}
|
||||
|
||||
if (addIndexs.length > 0) {
|
||||
sql += ','
|
||||
if (dropIndexNames.length > 0){
|
||||
sql += ','
|
||||
}
|
||||
addIndexs.forEach(a => {
|
||||
sql += ` ADD ${a.unique ? 'UNIQUE' : ''} INDEX ${a.indexName}(${a.columnNames.join(',')}) USING ${a.indexType} COMMENT '${a.indexComment}',`;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user