fix: The table existence check should quote the table name (#7949)

This commit is contained in:
Adrien de Peretti
2024-07-04 16:17:24 +02:00
committed by GitHub
parent 7b84d854f0
commit 32998b7527
@@ -40,7 +40,9 @@ export function getMigration(
let hasTable = false
try {
await orm.em.getConnection().execute(`SELECT 1 FROM ${tableName} LIMIT 0`)
await orm.em
.getConnection()
.execute(`SELECT 1 FROM "${tableName}" LIMIT 0`)
hasTable = true
} catch {}