@strapi/database 4.1.0 → 4.1.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,6 +32,14 @@ class MysqlDialect extends Dialect {
32
32
  };
33
33
  }
34
34
 
35
+ async initialize() {
36
+ try {
37
+ await this.db.connection.raw(`set session sql_require_primary_key = 0;`);
38
+ } catch (err) {
39
+ // Ignore error due to lack of session permissions
40
+ }
41
+ }
42
+
35
43
  async startSchemaUpdate() {
36
44
  await this.db.connection.raw(`set foreign_key_checks = 0;`);
37
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/database",
3
- "version": "4.1.0",
3
+ "version": "4.1.1-alpha.0",
4
4
  "description": "Strapi's database layer",
5
5
  "homepage": "https://strapi.io",
6
6
  "bugs": {
@@ -42,5 +42,5 @@
42
42
  "node": ">=12.22.0 <=16.x.x",
43
43
  "npm": ">=6.0.0"
44
44
  },
45
- "gitHead": "d4273d81fbeec230b5734375e43a5f1f1f2a0231"
45
+ "gitHead": "bedb04a0cc23719e4eac43e6005fe0fa3d48a9a6"
46
46
  }