Skip to content

Commit

Permalink
Fix for old versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Sep 14, 2023
1 parent a0dd827 commit 58ecdba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ protected function findColumns(TableSchemaInterface $table): bool
OR rw.ev_action IS NOT NULL AND ct.contype = 'p'
AND (ARRAY(
SELECT regexp_matches(rw.ev_action, '{TARGETENTRY .*? :resorigtbl (\d+) :resorigcol (\d+) ', 'g')
))[a.attnum:a.attnum] <@ (ct.conrelid || ct.conkey)::text[]
))[a.attnum:a.attnum] <@ (ct.conrelid::text || ct.conkey::text[])
WHERE
a.attnum > 0 AND t.typname != '' AND NOT a.attisdropped
AND c.relname = :tableName
Expand Down Expand Up @@ -924,7 +924,7 @@ private function loadTableConstraints(string $tableName, string $returnType): ar
OR "rw"."ev_action" IS NOT NULL AND "c"."conrelid" != 0
AND (ARRAY(
SELECT regexp_matches("rw"."ev_action", '{TARGETENTRY .*? :resorigtbl (\d+) :resorigcol (\d+) ', 'g')
))["a"."attnum":"a"."attnum"] <@ ("c"."conrelid" || "c"."conkey")::text[]
))["a"."attnum":"a"."attnum"] <@ ("c"."conrelid"::text || "c"."conkey"::text[])
LEFT JOIN "pg_class" AS "ftc"
ON "ftc"."oid" = "c"."confrelid"
LEFT JOIN "pg_namespace" AS "ftcns"
Expand Down

0 comments on commit 58ecdba

Please sign in to comment.