Skip to content

Commit 884431e

Browse files
HonzaMatosikhrach
authored andcommitted
PostgreSqlPlatform: Compatibility fix for Postgres 12
Replace removed column `adsrc` with solution from adminer: https://github.com/vrana/adminer/pull/367/files
1 parent 3d4bc5a commit 884431e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Platforms/PostgreSqlPlatform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function getColumns(string $table): array
6464
CASE WHEN a.atttypmod = -1 THEN NULL ELSE a.atttypmod -4 END AS size,
6565
pg_catalog.pg_get_expr(ad.adbin, 'pg_catalog.pg_attrdef'::regclass)::varchar AS default,
6666
coalesce(co.contype = 'p', FALSE) AS is_primary,
67-
coalesce(co.contype = 'p' AND strpos(ad.adsrc, 'nextval') = 1, FALSE) AS is_autoincrement,
67+
coalesce(co.contype = 'p' AND strpos(pg_get_expr(ad.adbin, ad.adrelid), 'nextval') = 1, FALSE) AS is_autoincrement,
6868
FALSE AS is_unsigned,
6969
NOT (a.attnotnull OR t.typtype = 'd' AND t.typnotnull) AS is_nullable,
7070
substring(pg_catalog.pg_get_expr(ad.adbin, 'pg_catalog.pg_attrdef'::regclass) from %s) AS sequence

0 commit comments

Comments
 (0)