orchid-orm 1.58.4 → 1.58.5
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/dist/migrations/node-postgres.js +10 -5
- package/dist/migrations/node-postgres.js.map +1 -1
- package/dist/migrations/node-postgres.mjs +11 -6
- package/dist/migrations/node-postgres.mjs.map +1 -1
- package/dist/migrations/postgres-js.js +10 -5
- package/dist/migrations/postgres-js.js.map +1 -1
- package/dist/migrations/postgres-js.mjs +11 -6
- package/dist/migrations/postgres-js.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -24,7 +24,14 @@ const compareSqlExpressions = async (tableExpressions, adapter) => {
|
|
|
24
24
|
`SELECT pg_get_viewdef('${viewName}') v`,
|
|
25
25
|
`DROP VIEW ${viewName}`
|
|
26
26
|
].join("; ");
|
|
27
|
-
const result = await adapter.query(combinedQueries, values).then(
|
|
27
|
+
const result = await adapter.query(combinedQueries, values).then(
|
|
28
|
+
(res) => res[1],
|
|
29
|
+
(err) => {
|
|
30
|
+
if (err.code !== "42704") {
|
|
31
|
+
throw err;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
);
|
|
28
35
|
if (!result) {
|
|
29
36
|
handle();
|
|
30
37
|
return;
|
|
@@ -606,15 +613,13 @@ const getColumnDbType = (column, currentSchema) => {
|
|
|
606
613
|
let type = item instanceof pqb.EnumColumn ? item.enumName : item.dataType;
|
|
607
614
|
type = type.startsWith(currentSchema + ".") ? type.slice(currentSchema.length + 1) : type;
|
|
608
615
|
return type + "[]".repeat(column.data.arrayDims);
|
|
609
|
-
} else
|
|
616
|
+
} else {
|
|
610
617
|
let type = column.dataType;
|
|
611
618
|
const i = type.indexOf("(");
|
|
612
619
|
if (i !== -1) {
|
|
613
620
|
type = type.slice(0, i);
|
|
614
621
|
}
|
|
615
|
-
return type.includes(".") ? type : currentSchema + "." + type;
|
|
616
|
-
} else {
|
|
617
|
-
return column.dataType;
|
|
622
|
+
return column.data.isOfCustomType ? type.includes(".") ? type : currentSchema + "." + type : type;
|
|
618
623
|
}
|
|
619
624
|
};
|
|
620
625
|
const getColumnDbTypeQuoted = (column, currentSchema) => {
|