rake-db 2.4.12 → 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.mjs
CHANGED
|
@@ -1687,9 +1687,9 @@ WHERE ${filterSchema("n.nspname")}`
|
|
|
1687
1687
|
table_schema "schemaName",
|
|
1688
1688
|
table_name "tableName",
|
|
1689
1689
|
column_name "name",
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
data_type "
|
|
1690
|
+
typname "type",
|
|
1691
|
+
n.nspname "typeSchema",
|
|
1692
|
+
data_type = 'ARRAY' "isArray",
|
|
1693
1693
|
character_maximum_length AS "maxChars",
|
|
1694
1694
|
numeric_precision AS "numericPrecision",
|
|
1695
1695
|
numeric_scale AS "numericScale",
|
|
@@ -1700,15 +1700,23 @@ WHERE ${filterSchema("n.nspname")}`
|
|
|
1700
1700
|
NULLIF(a.attcompression, '') AS compression,
|
|
1701
1701
|
pgd.description AS "comment"
|
|
1702
1702
|
FROM information_schema.columns c
|
|
1703
|
-
|
|
1703
|
+
JOIN pg_catalog.pg_statio_all_tables st
|
|
1704
1704
|
ON c.table_schema = st.schemaname
|
|
1705
1705
|
AND c.table_name = st.relname
|
|
1706
1706
|
LEFT JOIN pg_catalog.pg_description pgd
|
|
1707
1707
|
ON pgd.objoid = st.relid
|
|
1708
1708
|
AND pgd.objsubid = c.ordinal_position
|
|
1709
|
-
|
|
1709
|
+
JOIN pg_catalog.pg_attribute a
|
|
1710
1710
|
ON a.attrelid = st.relid
|
|
1711
1711
|
AND a.attnum = c.ordinal_position
|
|
1712
|
+
JOIN pg_catalog.pg_type t
|
|
1713
|
+
ON (
|
|
1714
|
+
CASE WHEN data_type = 'ARRAY'
|
|
1715
|
+
THEN typarray
|
|
1716
|
+
ELSE oid
|
|
1717
|
+
END
|
|
1718
|
+
) = atttypid
|
|
1719
|
+
JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace
|
|
1712
1720
|
WHERE ${filterSchema("table_schema")}
|
|
1713
1721
|
ORDER BY c.ordinal_position`
|
|
1714
1722
|
);
|
|
@@ -2234,10 +2242,9 @@ const pushTableAst = (config, ast, data, domains, table, pendingTables, innerFKe
|
|
|
2234
2242
|
if (isSerial) {
|
|
2235
2243
|
item = __spreadProps(__spreadValues({}, item), { default: void 0 });
|
|
2236
2244
|
}
|
|
2237
|
-
const isArray = item.dataType === "ARRAY";
|
|
2238
2245
|
let column = getColumn(config, data, domains, __spreadProps(__spreadValues({}, item), {
|
|
2239
|
-
type:
|
|
2240
|
-
isArray,
|
|
2246
|
+
type: item.type,
|
|
2247
|
+
isArray: item.isArray,
|
|
2241
2248
|
isSerial
|
|
2242
2249
|
}));
|
|
2243
2250
|
if ((primaryKey == null ? void 0 : primaryKey.columnNames.length) === 1 && (primaryKey == null ? void 0 : primaryKey.columnNames[0]) === item.name) {
|