Skip to content

Commit

Permalink
Merge branch 'master' into cli-security
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrebodin committed Feb 24, 2022
2 parents 2c735db + 1efba6d commit bedb04a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/core/database/lib/dialects/mysql/index.js
Expand Up @@ -32,6 +32,14 @@ class MysqlDialect extends Dialect {
};
}

async initialize() {
try {
await this.db.connection.raw(`set session sql_require_primary_key = 0;`);
} catch (err) {
// Ignore error due to lack of session permissions
}
}

async startSchemaUpdate() {
await this.db.connection.raw(`set foreign_key_checks = 0;`);
}
Expand Down

0 comments on commit bedb04a

Please sign in to comment.