@mikro-orm/knex 6.4.17-dev.4 → 6.4.17-dev.6
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.
- package/package.json +2 -2
- package/schema/DatabaseTable.js +1 -0
- package/schema/SchemaHelper.js +1 -1
- package/typings.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/knex",
|
|
3
|
-
"version": "6.4.17-dev.
|
|
3
|
+
"version": "6.4.17-dev.6",
|
|
4
4
|
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@mikro-orm/core": "^6.4.16"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@mikro-orm/core": "6.4.17-dev.
|
|
69
|
+
"@mikro-orm/core": "6.4.17-dev.6",
|
|
70
70
|
"better-sqlite3": "*",
|
|
71
71
|
"libsql": "*",
|
|
72
72
|
"mariadb": "*"
|
package/schema/DatabaseTable.js
CHANGED
|
@@ -115,6 +115,7 @@ class DatabaseTable {
|
|
|
115
115
|
localTableName: this.getShortestName(),
|
|
116
116
|
referencedColumnNames: prop.referencedColumnNames,
|
|
117
117
|
referencedTableName: schema ? `${schema}.${prop.referencedTableName}` : prop.referencedTableName,
|
|
118
|
+
createForeignKeyConstraint: prop.createForeignKeyConstraint,
|
|
118
119
|
};
|
|
119
120
|
const cascade = prop.cascade.includes(core_1.Cascade.REMOVE) || prop.cascade.includes(core_1.Cascade.ALL);
|
|
120
121
|
if (prop.deleteRule || cascade || prop.nullable) {
|
package/schema/SchemaHelper.js
CHANGED
|
@@ -321,7 +321,7 @@ class SchemaHelper {
|
|
|
321
321
|
});
|
|
322
322
|
}
|
|
323
323
|
createForeignKey(table, foreignKey, schema) {
|
|
324
|
-
if (!this.options.createForeignKeyConstraints) {
|
|
324
|
+
if (!this.options.createForeignKeyConstraints || !foreignKey.createForeignKeyConstraint) {
|
|
325
325
|
return;
|
|
326
326
|
}
|
|
327
327
|
const builder = table
|