@mikro-orm/postgresql 6.3.11-dev.9 → 6.3.12-dev.0
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.d.ts +1 -1
- package/PostgreSqlPlatform.js +5 -5
- package/README.md +1 -0
- package/package.json +4 -4
package/PostgreSqlPlatform.d.ts
CHANGED
|
@@ -86,7 +86,7 @@ export declare class PostgreSqlPlatform extends AbstractSqlPlatform {
|
|
|
86
86
|
getDefaultSchemaName(): string | undefined;
|
|
87
87
|
/**
|
|
88
88
|
* Returns the default name of index for the given columns
|
|
89
|
-
* cannot go past
|
|
89
|
+
* cannot go past 63 character length for identifiers in MySQL
|
|
90
90
|
*/
|
|
91
91
|
getIndexName(tableName: string, columns: string[], type: 'index' | 'unique' | 'foreign' | 'primary' | 'sequence'): string;
|
|
92
92
|
getDefaultPrimaryName(tableName: string, columns: string[]): string;
|
package/PostgreSqlPlatform.js
CHANGED
|
@@ -331,19 +331,19 @@ class PostgreSqlPlatform extends knex_1.AbstractSqlPlatform {
|
|
|
331
331
|
}
|
|
332
332
|
/**
|
|
333
333
|
* Returns the default name of index for the given columns
|
|
334
|
-
* cannot go past
|
|
334
|
+
* cannot go past 63 character length for identifiers in MySQL
|
|
335
335
|
*/
|
|
336
336
|
getIndexName(tableName, columns, type) {
|
|
337
337
|
const indexName = super.getIndexName(tableName, columns, type);
|
|
338
|
-
if (indexName.length >
|
|
339
|
-
return `${indexName.substring(0,
|
|
338
|
+
if (indexName.length > 63) {
|
|
339
|
+
return `${indexName.substring(0, 55 - type.length)}_${core_1.Utils.hash(indexName, 5)}_${type}`;
|
|
340
340
|
}
|
|
341
341
|
return indexName;
|
|
342
342
|
}
|
|
343
343
|
getDefaultPrimaryName(tableName, columns) {
|
|
344
344
|
const indexName = `${tableName}_pkey`;
|
|
345
|
-
if (indexName.length >
|
|
346
|
-
return `${indexName.substring(0,
|
|
345
|
+
if (indexName.length > 63) {
|
|
346
|
+
return `${indexName.substring(0, 55 - 'primary'.length)}_${core_1.Utils.hash(indexName, 5)}_primary`;
|
|
347
347
|
}
|
|
348
348
|
return indexName;
|
|
349
349
|
}
|
package/README.md
CHANGED
|
@@ -164,6 +164,7 @@ You can find example integrations for some popular frameworks in the [`mikro-orm
|
|
|
164
164
|
- [Accounts.js REST and GraphQL authentication + SQLite](https://github.com/darkbasic/mikro-orm-accounts-example)
|
|
165
165
|
- [Nest + Shopify + PostgreSQL + GraphQL](https://github.com/Cloudshelf/Shopify_CSConnector)
|
|
166
166
|
- [Elysia.js + libSQL + Bun](https://github.com/mikro-orm/elysia-bun-example-app)
|
|
167
|
+
- [Electron.js + PostgreSQL](https://github.com/adnanlah/electron-mikro-orm-example-app)
|
|
167
168
|
|
|
168
169
|
### JavaScript Examples
|
|
169
170
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/postgresql",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.12-dev.0",
|
|
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,16 +58,16 @@
|
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@mikro-orm/knex": "6.3.
|
|
61
|
+
"@mikro-orm/knex": "6.3.12-dev.0",
|
|
62
62
|
"pg": "8.13.0",
|
|
63
63
|
"postgres-array": "3.0.2",
|
|
64
64
|
"postgres-date": "2.1.0",
|
|
65
65
|
"postgres-interval": "4.0.2"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@mikro-orm/core": "^6.3.
|
|
68
|
+
"@mikro-orm/core": "^6.3.11"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
|
-
"@mikro-orm/core": "6.3.
|
|
71
|
+
"@mikro-orm/core": "6.3.12-dev.0"
|
|
72
72
|
}
|
|
73
73
|
}
|