fix(core): Fix MySQL migration issue with table prefix (#4013)

* Fix mysql migration issue on execution entity

* Fix one down migration

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
Jonathan Bennetts
2022-09-03 19:02:39 +01:00
committed by GitHub
parent 5753110402
commit fc6484ba4d
2 changed files with 15 additions and 29 deletions

View File

@@ -22,7 +22,7 @@ export class AddAPIKeyColumn1652905585850 implements MigrationInterface {
public async down(queryRunner: QueryRunner): Promise<void> {
const tablePrefix = config.get('database.tablePrefix');
await queryRunner.query(
'DROP INDEX `IDX_81fc04c8a17de15835713505e4` ON `' + tablePrefix + 'execution_entity`',
`DROP INDEX \`UQ_${tablePrefix}ie0zomxves9w3p774drfrkxtj5\` ON \`${tablePrefix}user\``,
);
await queryRunner.query('ALTER TABLE `' + tablePrefix + 'user` DROP COLUMN `apiKey`');
}