Skip to content

Commit 8c81bf3

Browse files
bajzecerdg
authored andcommitted
PgSqlDriver: stop using adsrc column (#242)
Was removed in V12
1 parent e17242a commit 8c81bf3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Database/Drivers/PgSqlDriver.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public function getColumns(string $table): array
136136
CASE WHEN a.atttypmod = -1 THEN NULL ELSE a.atttypmod -4 END AS size,
137137
NOT (a.attnotnull OR t.typtype = 'd' AND t.typnotnull) AS nullable,
138138
pg_catalog.pg_get_expr(ad.adbin, 'pg_catalog.pg_attrdef'::regclass)::varchar AS default,
139-
coalesce(co.contype = 'p' AND strpos(ad.adsrc, 'nextval') = 1, FALSE) AS autoincrement,
139+
coalesce(co.contype = 'p' AND strpos(pg_catalog.pg_get_expr(ad.adbin, ad.adrelid), 'nextval') = 1, FALSE) AS autoincrement,
140140
coalesce(co.contype = 'p', FALSE) AS primary,
141141
substring(pg_catalog.pg_get_expr(ad.adbin, 'pg_catalog.pg_attrdef'::regclass) from 'nextval[(]''\"?([^''\"]+)') AS sequence
142142
FROM

0 commit comments

Comments
 (0)