@mikro-orm/knex 6.2.10-dev.27 → 6.2.10-dev.29
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/SchemaHelper.js +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/knex",
|
|
3
|
-
"version": "6.2.10-dev.
|
|
3
|
+
"version": "6.2.10-dev.29",
|
|
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.2.9"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@mikro-orm/core": "6.2.10-dev.
|
|
69
|
+
"@mikro-orm/core": "6.2.10-dev.29",
|
|
70
70
|
"better-sqlite3": "*",
|
|
71
71
|
"libsql": "*",
|
|
72
72
|
"mariadb": "*"
|
package/schema/SchemaHelper.js
CHANGED
|
@@ -354,7 +354,10 @@ class SchemaHelper {
|
|
|
354
354
|
if (index.primary && !createPrimary) {
|
|
355
355
|
return;
|
|
356
356
|
}
|
|
357
|
-
if (index.
|
|
357
|
+
if (index.expression) {
|
|
358
|
+
this.pushTableQuery(table, index.expression);
|
|
359
|
+
}
|
|
360
|
+
else if (index.primary) {
|
|
358
361
|
const keyName = this.hasNonDefaultPrimaryKeyName(tableDef) ? index.keyName : undefined;
|
|
359
362
|
table.primary(index.columnNames, keyName);
|
|
360
363
|
}
|
|
@@ -368,9 +371,6 @@ class SchemaHelper {
|
|
|
368
371
|
table.unique(index.columnNames, { indexName: index.keyName, deferrable: index.deferMode });
|
|
369
372
|
}
|
|
370
373
|
}
|
|
371
|
-
else if (index.expression) {
|
|
372
|
-
this.pushTableQuery(table, index.expression);
|
|
373
|
-
}
|
|
374
374
|
else if (index.type === 'fulltext') {
|
|
375
375
|
const columns = index.columnNames.map(name => ({ name, type: tableDef.getColumn(name).type }));
|
|
376
376
|
if (this.platform.supportsCreatingFullTextIndex()) {
|