Skip to content

Commit

Permalink
Merge pull request #4 from mubin-ct/patch-1
Browse files Browse the repository at this point in the history
fix: update quotes on table name to back ticks
  • Loading branch information
mmRoshani authored Sep 11, 2022
2 parents 81a391a + d5f04b7 commit 9ca3f5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/getLastMigrationState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {

export default async function getLastMigrationState(sequelize: Sequelize) {
const [lastExecutedMigration] = await sequelize.query<SequelizeMigrations>(
'SELECT name FROM "SequelizeMeta" ORDER BY name desc limit 1',
'SELECT name FROM `SequelizeMeta` ORDER BY name desc limit 1',
{ type: QueryTypes.SELECT }
)

Expand All @@ -19,7 +19,7 @@ export default async function getLastMigrationState(sequelize: Sequelize) {
: -1

const [lastMigration] = await sequelize.query<SequelizeMigrationsMeta>(
`SELECT state FROM "SequelizeMigrationsMeta" where revision = '${lastRevision}'`,
"SELECT state FROM `SequelizeMigrationsMeta` where revision = '${lastRevision}'",
{ type: QueryTypes.SELECT }
)

Expand Down

0 comments on commit 9ca3f5b

Please sign in to comment.