Skip to content

Commit

Permalink
fix: index deletion issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio286 committed Dec 1, 2020
1 parent 41505bd commit f8cf90a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/main/libs/clients/MySQLClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,6 @@ export class MySQLClient extends AntaresCore {
options
} = params;

console.log(params);

let sql = `ALTER TABLE \`${table}\` `;
const alterColumns = [];

Expand Down
12 changes: 7 additions & 5 deletions src/renderer/components/WorkspacePropsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,13 @@ export default {
this.originalIndexes.forEach(originalIndex => {
const lI = this.localIndexes.findIndex(localIndex => localIndex._id === originalIndex._id);
if (JSON.stringify(originalIndex) !== JSON.stringify(this.localIndexes[lI])) {
indexChanges.changes.push({
...this.localIndexes[lI],
oldName: originalIndex.name,
oldType: originalIndex.type
});
if (this.localIndexes[lI]) {
indexChanges.changes.push({
...this.localIndexes[lI],
oldName: originalIndex.name,
oldType: originalIndex.type
});
}
}
});
Expand Down

0 comments on commit f8cf90a

Please sign in to comment.