diff --git a/src/main/libs/clients/MySQLClient.ts b/src/main/libs/clients/MySQLClient.ts index b2b49f83..92ac0e11 100644 --- a/src/main/libs/clients/MySQLClient.ts +++ b/src/main/libs/clients/MySQLClient.ts @@ -696,7 +696,12 @@ export class MySQLClient extends BaseClient { return rows.length ? rows[0].count : 0; } - async getTableChecks ({ schema, table }: { schema: string; table: string }): Promise { + async getTableChecks ({ schema, table }: { schema: string; table: string }): Promise { + const { rows: checkTableExists } = await this.raw('SELECT table_name FROM information_schema.tables WHERE table_schema = "information_schema" AND table_name = "CHECK_CONSTRAINTS"'); + + if (!checkTableExists.length)// check if CHECK_CONSTRAINTS table exists + return false; + const { rows } = await this.raw(` SELECT CONSTRAINT_NAME as name, diff --git a/src/renderer/components/WorkspaceTabPropsTable.vue b/src/renderer/components/WorkspaceTabPropsTable.vue index 32ea29db..97db3d68 100644 --- a/src/renderer/components/WorkspaceTabPropsTable.vue +++ b/src/renderer/components/WorkspaceTabPropsTable.vue @@ -73,7 +73,7 @@ {{ t('database.foreignKeys') }}