rake-db 2.4.11 → 2.4.13
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/index.js +15 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1715,9 +1715,9 @@ WHERE ${filterSchema("n.nspname")}`
|
|
|
1715
1715
|
table_schema "schemaName",
|
|
1716
1716
|
table_name "tableName",
|
|
1717
1717
|
column_name "name",
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
data_type "
|
|
1718
|
+
typname "type",
|
|
1719
|
+
n.nspname "typeSchema",
|
|
1720
|
+
data_type = 'ARRAY' "isArray",
|
|
1721
1721
|
character_maximum_length AS "maxChars",
|
|
1722
1722
|
numeric_precision AS "numericPrecision",
|
|
1723
1723
|
numeric_scale AS "numericScale",
|
|
@@ -1728,15 +1728,23 @@ WHERE ${filterSchema("n.nspname")}`
|
|
|
1728
1728
|
NULLIF(a.attcompression, '') AS compression,
|
|
1729
1729
|
pgd.description AS "comment"
|
|
1730
1730
|
FROM information_schema.columns c
|
|
1731
|
-
|
|
1731
|
+
JOIN pg_catalog.pg_statio_all_tables st
|
|
1732
1732
|
ON c.table_schema = st.schemaname
|
|
1733
1733
|
AND c.table_name = st.relname
|
|
1734
1734
|
LEFT JOIN pg_catalog.pg_description pgd
|
|
1735
1735
|
ON pgd.objoid = st.relid
|
|
1736
1736
|
AND pgd.objsubid = c.ordinal_position
|
|
1737
|
-
|
|
1737
|
+
JOIN pg_catalog.pg_attribute a
|
|
1738
1738
|
ON a.attrelid = st.relid
|
|
1739
1739
|
AND a.attnum = c.ordinal_position
|
|
1740
|
+
JOIN pg_catalog.pg_type t
|
|
1741
|
+
ON (
|
|
1742
|
+
CASE WHEN data_type = 'ARRAY'
|
|
1743
|
+
THEN typarray
|
|
1744
|
+
ELSE oid
|
|
1745
|
+
END
|
|
1746
|
+
) = atttypid
|
|
1747
|
+
JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace
|
|
1740
1748
|
WHERE ${filterSchema("table_schema")}
|
|
1741
1749
|
ORDER BY c.ordinal_position`
|
|
1742
1750
|
);
|
|
@@ -2262,10 +2270,9 @@ const pushTableAst = (config, ast, data, domains, table, pendingTables, innerFKe
|
|
|
2262
2270
|
if (isSerial) {
|
|
2263
2271
|
item = __spreadProps(__spreadValues({}, item), { default: void 0 });
|
|
2264
2272
|
}
|
|
2265
|
-
const isArray = item.dataType === "ARRAY";
|
|
2266
2273
|
let column = getColumn(config, data, domains, __spreadProps(__spreadValues({}, item), {
|
|
2267
|
-
type:
|
|
2268
|
-
isArray,
|
|
2274
|
+
type: item.type,
|
|
2275
|
+
isArray: item.isArray,
|
|
2269
2276
|
isSerial
|
|
2270
2277
|
}));
|
|
2271
2278
|
if ((primaryKey == null ? void 0 : primaryKey.columnNames.length) === 1 && (primaryKey == null ? void 0 : primaryKey.columnNames[0]) === item.name) {
|