Skip to content

Commit

Permalink
PostgreSqlPlatform: Compatibility fix for Postgres 12
Browse files Browse the repository at this point in the history
Replace removed column `adsrc` with solution from adminer: https://github.com/vrana/adminer/pull/367/files
  • Loading branch information
HonzaMatosik authored and hrach committed Feb 26, 2020
1 parent 3d4bc5a commit 884431e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Platforms/PostgreSqlPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function getColumns(string $table): array
CASE WHEN a.atttypmod = -1 THEN NULL ELSE a.atttypmod -4 END AS size,
pg_catalog.pg_get_expr(ad.adbin, 'pg_catalog.pg_attrdef'::regclass)::varchar AS default,
coalesce(co.contype = 'p', FALSE) AS is_primary,
coalesce(co.contype = 'p' AND strpos(ad.adsrc, 'nextval') = 1, FALSE) AS is_autoincrement,
coalesce(co.contype = 'p' AND strpos(pg_get_expr(ad.adbin, ad.adrelid), 'nextval') = 1, FALSE) AS is_autoincrement,
FALSE AS is_unsigned,
NOT (a.attnotnull OR t.typtype = 'd' AND t.typnotnull) AS is_nullable,
substring(pg_catalog.pg_get_expr(ad.adbin, 'pg_catalog.pg_attrdef'::regclass) from %s) AS sequence
Expand Down

0 comments on commit 884431e

Please sign in to comment.