Skip to content

Commit

Permalink
fix: add try catch to pk check
Browse files Browse the repository at this point in the history
  • Loading branch information
derrickmehaffy committed Feb 23, 2022
1 parent 92dde65 commit 6f73f67
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/core/database/lib/dialects/mysql/index.js
Expand Up @@ -33,7 +33,11 @@ class MysqlDialect extends Dialect {
}

async initialize() {
await this.db.connection.raw(`set session sql_require_primary_key = 0;`);
try {
await this.db.connection.raw(`set session sql_require_primary_key = 0;`);
} catch (err) {
console.error({ err });
}
}

async startSchemaUpdate() {
Expand Down

0 comments on commit 6f73f67

Please sign in to comment.