rake-db 2.37.17 → 2.37.19
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 +8 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5008,14 +5008,12 @@ const constraintsSql = `SELECT
|
|
|
5008
5008
|
t.relname AS "tableName",
|
|
5009
5009
|
c.conname AS "name",
|
|
5010
5010
|
(
|
|
5011
|
-
SELECT json_agg(
|
|
5012
|
-
FROM
|
|
5011
|
+
SELECT json_agg(a.attname ORDER BY k.ordinality)
|
|
5012
|
+
FROM unnest(c.conkey) WITH ORDINALITY AS k(attnum, ordinality)
|
|
5013
5013
|
JOIN pg_catalog.pg_attribute a
|
|
5014
5014
|
ON a.attrelid = c.conrelid
|
|
5015
|
-
AND a.
|
|
5015
|
+
AND a.attnum = k.attnum
|
|
5016
5016
|
WHERE contype = 'p'
|
|
5017
|
-
AND ccu.constraint_name = c.conname
|
|
5018
|
-
AND ccu.table_schema = s.nspname
|
|
5019
5017
|
) AS "primaryKey",
|
|
5020
5018
|
(
|
|
5021
5019
|
SELECT
|
|
@@ -5057,15 +5055,16 @@ const constraintsSql = `SELECT
|
|
|
5057
5055
|
WHEN false THEN
|
|
5058
5056
|
json_build_object(
|
|
5059
5057
|
'columns',
|
|
5060
|
-
json_agg(
|
|
5058
|
+
json_agg(a.attname ORDER BY k.ordinality),
|
|
5061
5059
|
'expression',
|
|
5062
5060
|
pg_get_expr(conbin, conrelid)
|
|
5063
5061
|
)
|
|
5064
5062
|
END
|
|
5065
|
-
FROM
|
|
5063
|
+
FROM unnest(c.conkey) WITH ORDINALITY AS k(attnum, ordinality)
|
|
5064
|
+
JOIN pg_catalog.pg_attribute a
|
|
5065
|
+
ON a.attrelid = c.conrelid
|
|
5066
|
+
AND a.attnum = k.attnum
|
|
5066
5067
|
WHERE conbin IS NOT NULL
|
|
5067
|
-
AND ccu.constraint_name = c.conname
|
|
5068
|
-
AND ccu.table_schema = s.nspname
|
|
5069
5068
|
) AS "check"
|
|
5070
5069
|
FROM pg_catalog.pg_constraint c
|
|
5071
5070
|
JOIN pg_class t ON t.oid = conrelid
|