@mikro-orm/knex 6.1.13-dev.0 → 6.1.13-dev.1

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.1.13-dev.0",
3
+ "version": "6.1.13-dev.1",
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,6 +66,6 @@
66
66
  "@mikro-orm/core": "^6.1.12"
67
67
  },
68
68
  "peerDependencies": {
69
- "@mikro-orm/core": "6.1.13-dev.0"
69
+ "@mikro-orm/core": "6.1.13-dev.1"
70
70
  }
71
71
  }
@@ -1,10 +1,10 @@
1
- import type { Knex } from 'knex';
2
1
  import { type Connection, type Dictionary } from '@mikro-orm/core';
2
+ import type { Knex } from 'knex';
3
3
  import type { AbstractSqlConnection } from '../AbstractSqlConnection';
4
4
  import type { AbstractSqlPlatform } from '../AbstractSqlPlatform';
5
5
  import type { CheckDef, Column, IndexDef, Table, TableDifference } from '../typings';
6
- import type { DatabaseTable } from './DatabaseTable';
7
6
  import type { DatabaseSchema } from './DatabaseSchema';
7
+ import type { DatabaseTable } from './DatabaseTable';
8
8
  export declare abstract class SchemaHelper {
9
9
  protected readonly platform: AbstractSqlPlatform;
10
10
  constructor(platform: AbstractSqlPlatform);
@@ -187,12 +187,8 @@ class SchemaHelper {
187
187
  mapForeignKeys(fks, tableName, schemaName) {
188
188
  return fks.reduce((ret, fk) => {
189
189
  if (ret[fk.constraint_name]) {
190
- if (!ret[fk.constraint_name].columnNames.includes(fk.column_name)) {
191
- ret[fk.constraint_name].columnNames.push(fk.column_name);
192
- }
193
- if (!ret[fk.constraint_name].referencedColumnNames.includes(fk.referenced_column_name)) {
194
- ret[fk.constraint_name].referencedColumnNames.push(fk.referenced_column_name);
195
- }
190
+ ret[fk.constraint_name].columnNames.push(fk.column_name);
191
+ ret[fk.constraint_name].referencedColumnNames.push(fk.referenced_column_name);
196
192
  }
197
193
  else {
198
194
  ret[fk.constraint_name] = {