@mikro-orm/postgresql 6.2.10-dev.77 → 6.2.10-dev.79
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.
|
@@ -106,16 +106,17 @@ class PostgreSqlSchemaHelper extends knex_1.SchemaHelper {
|
|
|
106
106
|
is_nullable,
|
|
107
107
|
udt_name,
|
|
108
108
|
coalesce(datetime_precision, character_maximum_length) length,
|
|
109
|
+
atttypmod custom_length,
|
|
109
110
|
numeric_precision,
|
|
110
111
|
numeric_scale,
|
|
111
112
|
data_type,
|
|
112
113
|
is_identity,
|
|
113
114
|
identity_generation,
|
|
114
115
|
generation_expression,
|
|
115
|
-
|
|
116
|
-
from pg_catalog.pg_class c
|
|
117
|
-
where c.oid = (select ('"' || cols.table_schema || '"."' || cols.table_name || '"')::regclass::oid) and c.relname = cols.table_name) as column_comment
|
|
116
|
+
pg_catalog.col_description(pgc.oid, cols.ordinal_position::int) column_comment
|
|
118
117
|
from information_schema.columns cols
|
|
118
|
+
join pg_class pgc on cols.table_name = pgc.relname
|
|
119
|
+
join pg_attribute pga on pgc.oid = pga.attrelid and cols.column_name = pga.attname
|
|
119
120
|
where (${tables.map(t => `(table_schema = ${this.platform.quoteValue(t.schema_name)} and table_name = ${this.platform.quoteValue(t.table_name)})`).join(' or ')})
|
|
120
121
|
order by ordinal_position`;
|
|
121
122
|
const allColumns = await connection.execute(sql);
|
|
@@ -129,6 +130,9 @@ class PostgreSqlSchemaHelper extends knex_1.SchemaHelper {
|
|
|
129
130
|
let type = col.data_type.toLowerCase() === 'array'
|
|
130
131
|
? col.udt_name.replace(/^_(.*)$/, '$1[]')
|
|
131
132
|
: col.udt_name;
|
|
133
|
+
if (type === 'vector' && col.length == null && col.custom_length != null) {
|
|
134
|
+
col.length = col.custom_length;
|
|
135
|
+
}
|
|
132
136
|
if (col.length != null && !type.endsWith(`(${col.length})`)) {
|
|
133
137
|
type += `(${col.length})`;
|
|
134
138
|
}
|
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.79",
|
|
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.79",
|
|
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.79"
|
|
72
72
|
}
|
|
73
73
|
}
|