rake-db 2.37.17 → 2.37.18
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 +3 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4985,14 +4985,12 @@ const constraintsSql = `SELECT
|
|
|
4985
4985
|
t.relname AS "tableName",
|
|
4986
4986
|
c.conname AS "name",
|
|
4987
4987
|
(
|
|
4988
|
-
SELECT json_agg(
|
|
4989
|
-
FROM
|
|
4988
|
+
SELECT json_agg(a.attname ORDER BY k.ordinality)
|
|
4989
|
+
FROM unnest(c.conkey) WITH ORDINALITY AS k(attnum, ordinality)
|
|
4990
4990
|
JOIN pg_catalog.pg_attribute a
|
|
4991
4991
|
ON a.attrelid = c.conrelid
|
|
4992
|
-
AND a.
|
|
4992
|
+
AND a.attnum = k.attnum
|
|
4993
4993
|
WHERE contype = 'p'
|
|
4994
|
-
AND ccu.constraint_name = c.conname
|
|
4995
|
-
AND ccu.table_schema = s.nspname
|
|
4996
4994
|
) AS "primaryKey",
|
|
4997
4995
|
(
|
|
4998
4996
|
SELECT
|