Skip to content

Commit

Permalink
fix: unescaped column name in order clause of "migrations" (#5108)
Browse files Browse the repository at this point in the history
* Fixed unescaped column name in order clause of "migrations"

Fix for #5102

* made it driver independent
  • Loading branch information
gerwinbrunner authored and pleerock committed Nov 22, 2019
1 parent 8f4f908 commit c0c8566
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/migration/MigrationExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ export class MigrationExecutor {
const migrationsRaw: ObjectLiteral[] = await this.connection.manager
.createQueryBuilder(queryRunner)
.select()
.orderBy("id", "DESC")
.orderBy(this.connection.driver.escape("id"), "DESC")
.from(this.migrationsTable, this.migrationsTableName)
.getRawMany();
return migrationsRaw.map(migrationRaw => {
Expand Down

0 comments on commit c0c8566

Please sign in to comment.