mirror of
				https://github.com/Fabio286/antares.git
				synced 2025-06-05 21:59:22 +02:00 
			
		
		
		
	fix: index deletion issue
This commit is contained in:
		| @@ -329,8 +329,6 @@ export class MySQLClient extends AntaresCore { | ||||
|          options | ||||
|       } = params; | ||||
|  | ||||
|       console.log(params); | ||||
|  | ||||
|       let sql = `ALTER TABLE \`${table}\` `; | ||||
|       const alterColumns = []; | ||||
|  | ||||
|   | ||||
| @@ -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 | ||||
|                   }); | ||||
|                } | ||||
|             } | ||||
|          }); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user