@mikro-orm/postgresql 7.0.0-dev.27 → 7.0.0-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/PostgreSqlPlatform.js +4 -2
- package/package.json +4 -4
package/PostgreSqlPlatform.js
CHANGED
|
@@ -350,15 +350,17 @@ export class PostgreSqlPlatform extends AbstractSqlPlatform {
|
|
|
350
350
|
getIndexName(tableName, columns, type) {
|
|
351
351
|
const indexName = super.getIndexName(tableName, columns, type);
|
|
352
352
|
if (indexName.length > 63) {
|
|
353
|
+
const hashAlgorithm = this.config.get('hashAlgorithm');
|
|
353
354
|
const suffix = type === 'primary' ? 'pkey' : type;
|
|
354
|
-
return `${indexName.substring(0, 55 - type.length)}_${Utils.hash(indexName, 5)}_${suffix}`;
|
|
355
|
+
return `${indexName.substring(0, 55 - type.length)}_${Utils.hash(indexName, 5, hashAlgorithm)}_${suffix}`;
|
|
355
356
|
}
|
|
356
357
|
return indexName;
|
|
357
358
|
}
|
|
358
359
|
getDefaultPrimaryName(tableName, columns) {
|
|
359
360
|
const indexName = `${tableName}_pkey`;
|
|
360
361
|
if (indexName.length > 63) {
|
|
361
|
-
|
|
362
|
+
const hashAlgorithm = this.config.get('hashAlgorithm');
|
|
363
|
+
return `${indexName.substring(0, 55 - 'pkey'.length)}_${Utils.hash(indexName, 5, hashAlgorithm)}_pkey`;
|
|
362
364
|
}
|
|
363
365
|
return indexName;
|
|
364
366
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/postgresql",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.0.0-dev.
|
|
4
|
+
"version": "7.0.0-dev.29",
|
|
5
5
|
"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.",
|
|
6
6
|
"exports": {
|
|
7
7
|
"./package.json": "./package.json",
|
|
@@ -50,18 +50,18 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@mikro-orm/knex": "7.0.0-dev.
|
|
53
|
+
"@mikro-orm/knex": "7.0.0-dev.29",
|
|
54
54
|
"pg": "8.16.3",
|
|
55
55
|
"postgres-array": "3.0.4",
|
|
56
56
|
"postgres-date": "2.1.0",
|
|
57
57
|
"postgres-interval": "4.0.2"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@mikro-orm/core": "^6.5.
|
|
60
|
+
"@mikro-orm/core": "^6.5.7",
|
|
61
61
|
"kysely": "0.28.7"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@mikro-orm/core": "7.0.0-dev.
|
|
64
|
+
"@mikro-orm/core": "7.0.0-dev.29",
|
|
65
65
|
"kysely": "*"
|
|
66
66
|
}
|
|
67
67
|
}
|