mirror of
https://github.com/Fabio286/antares.git
synced 2025-04-24 06:57:19 +02:00
fix: index deletion issue
This commit is contained in:
parent
41505bde65
commit
f8cf90a89e
@ -329,8 +329,6 @@ export class MySQLClient extends AntaresCore {
|
|||||||
options
|
options
|
||||||
} = params;
|
} = params;
|
||||||
|
|
||||||
console.log(params);
|
|
||||||
|
|
||||||
let sql = `ALTER TABLE \`${table}\` `;
|
let sql = `ALTER TABLE \`${table}\` `;
|
||||||
const alterColumns = [];
|
const alterColumns = [];
|
||||||
|
|
||||||
|
@ -303,12 +303,14 @@ export default {
|
|||||||
this.originalIndexes.forEach(originalIndex => {
|
this.originalIndexes.forEach(originalIndex => {
|
||||||
const lI = this.localIndexes.findIndex(localIndex => localIndex._id === originalIndex._id);
|
const lI = this.localIndexes.findIndex(localIndex => localIndex._id === originalIndex._id);
|
||||||
if (JSON.stringify(originalIndex) !== JSON.stringify(this.localIndexes[lI])) {
|
if (JSON.stringify(originalIndex) !== JSON.stringify(this.localIndexes[lI])) {
|
||||||
|
if (this.localIndexes[lI]) {
|
||||||
indexChanges.changes.push({
|
indexChanges.changes.push({
|
||||||
...this.localIndexes[lI],
|
...this.localIndexes[lI],
|
||||||
oldName: originalIndex.name,
|
oldName: originalIndex.name,
|
||||||
oldType: originalIndex.type
|
oldType: originalIndex.type
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Index Deletions
|
// Index Deletions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user