@mikro-orm/postgresql 6.2.10-dev.72 → 6.2.10-dev.74
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/PostgreSqlSchemaHelper.js +11 -2
- package/package.json +3 -3
|
@@ -502,12 +502,21 @@ class PostgreSqlSchemaHelper extends knex_1.SchemaHelper {
|
|
|
502
502
|
return res[tableName];
|
|
503
503
|
}
|
|
504
504
|
inferLengthFromColumnType(type) {
|
|
505
|
-
const match = type.match(/^(
|
|
505
|
+
const match = type.match(/^(\w+(?:\s+\w+)*)\s*(?:\(\s*(\d+)\s*\)|$)/);
|
|
506
506
|
if (!match) {
|
|
507
507
|
return;
|
|
508
508
|
}
|
|
509
509
|
if (!match[2]) {
|
|
510
|
-
|
|
510
|
+
switch (match[1]) {
|
|
511
|
+
case 'character varying':
|
|
512
|
+
case 'varchar':
|
|
513
|
+
return -1;
|
|
514
|
+
case 'interval':
|
|
515
|
+
case 'time':
|
|
516
|
+
case 'timestamptz':
|
|
517
|
+
return this.platform.getDefaultDateTimeLength();
|
|
518
|
+
}
|
|
519
|
+
return;
|
|
511
520
|
}
|
|
512
521
|
return +match[2];
|
|
513
522
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/postgresql",
|
|
3
|
-
"version": "6.2.10-dev.
|
|
3
|
+
"version": "6.2.10-dev.74",
|
|
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",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@mikro-orm/knex": "6.2.10-dev.
|
|
61
|
+
"@mikro-orm/knex": "6.2.10-dev.74",
|
|
62
62
|
"pg": "8.12.0",
|
|
63
63
|
"postgres-array": "3.0.2",
|
|
64
64
|
"postgres-date": "2.1.0",
|
|
@@ -68,6 +68,6 @@
|
|
|
68
68
|
"@mikro-orm/core": "^6.2.9"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
|
-
"@mikro-orm/core": "6.2.10-dev.
|
|
71
|
+
"@mikro-orm/core": "6.2.10-dev.74"
|
|
72
72
|
}
|
|
73
73
|
}
|