fix: The table existence check should quote the table name (#7949)
This commit is contained in:
1 parent
7b84d854f0
commit
32998b7527
1 file changed
+3
-1
@@ -40,7 +40,9 @@ export function getMigration(
|
|||||||
|
|
||||||
let hasTable = false
|
let hasTable = false
|
||||||
try {
|
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
|
hasTable = true
|
||||||
} catch {}
|
} catch {}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user