mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-25 15:08:47 -07:00
Refactor database bootstrap: cast attribute names to text in primary key constraint handling for improved compatibility
This commit is contained in:
@@ -340,7 +340,7 @@ public static class DatabaseBootstrap
|
||||
pk record;
|
||||
BEGIN
|
||||
FOR pk IN
|
||||
SELECT c.conname, array_agg(a.attname ORDER BY x.ordinality) AS cols
|
||||
SELECT c.conname, array_agg(a.attname::text ORDER BY x.ordinality) AS cols
|
||||
FROM pg_constraint c
|
||||
JOIN unnest(c.conkey) WITH ORDINALITY AS x(attnum, ordinality) ON true
|
||||
JOIN pg_attribute a ON a.attrelid = c.conrelid AND a.attnum = x.attnum
|
||||
@@ -353,7 +353,7 @@ public static class DatabaseBootstrap
|
||||
END IF;
|
||||
END LOOP;
|
||||
|
||||
SELECT array_agg(a.attname ORDER BY x.ordinality)
|
||||
SELECT array_agg(a.attname::text ORDER BY x.ordinality)
|
||||
INTO pk_cols
|
||||
FROM pg_constraint c
|
||||
JOIN unnest(c.conkey) WITH ORDINALITY AS x(attnum, ordinality) ON true
|
||||
|
||||
Reference in New Issue
Block a user