From 32998b7527cc679144401cc31c2c0b3714704d1b Mon Sep 17 00:00:00 2001 From: Adrien de Peretti Date: Thu, 4 Jul 2024 16:17:24 +0200 Subject: [PATCH] fix: The table existence check should quote the table name (#7949) --- packages/modules/link-modules/src/migration/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/modules/link-modules/src/migration/index.ts b/packages/modules/link-modules/src/migration/index.ts index a5a7772b11..076ffe951d 100644 --- a/packages/modules/link-modules/src/migration/index.ts +++ b/packages/modules/link-modules/src/migration/index.ts @@ -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 {}