@mikro-orm/knex 6.4.14-dev.15 → 6.4.14-dev.16

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/knex",
3
- "version": "6.4.14-dev.15",
3
+ "version": "6.4.14-dev.16",
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.13"
67
67
  },
68
68
  "peerDependencies": {
69
- "@mikro-orm/core": "6.4.14-dev.15",
69
+ "@mikro-orm/core": "6.4.14-dev.16",
70
70
  "better-sqlite3": "*",
71
71
  "libsql": "*",
72
72
  "mariadb": "*"
@@ -104,7 +104,7 @@ class DatabaseTable {
104
104
  this.columns[field].default = defaultValue;
105
105
  });
106
106
  if ([core_1.ReferenceKind.MANY_TO_ONE, core_1.ReferenceKind.ONE_TO_ONE].includes(prop.kind)) {
107
- const constraintName = this.getIndexName(true, prop.fieldNames, 'foreign');
107
+ const constraintName = this.getIndexName(prop.foreignKeyName ?? true, prop.fieldNames, 'foreign');
108
108
  let schema = prop.targetMeta.root.schema === '*' ? this.schema : (prop.targetMeta.root.schema ?? config.get('schema', this.platform.getDefaultSchemaName()));
109
109
  if (prop.referencedTableName.includes('.')) {
110
110
  schema = undefined;