@mikro-orm/sql 7.1.4-dev.1 → 7.1.4-dev.3
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.
|
@@ -768,11 +768,11 @@ export class PostgreSqlSchemaHelper extends SchemaHelper {
|
|
|
768
768
|
}
|
|
769
769
|
async getNativeEnumDefinitions(connection, schemas, ctx) {
|
|
770
770
|
const uniqueSchemas = Utils.unique(schemas);
|
|
771
|
-
const res = await connection.execute(`select t.typname as enum_name, n.nspname as schema_name, array_agg(e.enumlabel order by e.enumsortorder) as enum_value
|
|
771
|
+
const res = await connection.execute(`select t.typname as enum_name, n.nspname as schema_name, array_remove(array_agg(e.enumlabel order by e.enumsortorder), null) as enum_value
|
|
772
772
|
from pg_type t
|
|
773
|
-
join pg_enum e on t.oid = e.enumtypid
|
|
773
|
+
left join pg_enum e on t.oid = e.enumtypid
|
|
774
774
|
join pg_catalog.pg_namespace n on n.oid = t.typnamespace
|
|
775
|
-
where n.nspname in (${Array(uniqueSchemas.length).fill('?').join(', ')})
|
|
775
|
+
where t.typtype = 'e' and n.nspname in (${Array(uniqueSchemas.length).fill('?').join(', ')})
|
|
776
776
|
group by t.typname, n.nspname`, uniqueSchemas, 'all', ctx);
|
|
777
777
|
return res.reduce((o, row) => {
|
|
778
778
|
let name = row.enum_name;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/sql",
|
|
3
|
-
"version": "7.1.4-dev.
|
|
3
|
+
"version": "7.1.4-dev.3",
|
|
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
|
"keywords": [
|
|
6
6
|
"data-mapper",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@mikro-orm/core": "^7.1.3"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@mikro-orm/core": "7.1.4-dev.
|
|
56
|
+
"@mikro-orm/core": "7.1.4-dev.3"
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|
|
59
59
|
"node": ">= 22.17.0"
|