From 884431eb074bebab8dd2bdfb7b68055a78ecabbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Matos=CC=8Ci=CC=81k?= Date: Thu, 13 Feb 2020 16:46:02 +0100 Subject: [PATCH] PostgreSqlPlatform: Compatibility fix for Postgres 12 Replace removed column `adsrc` with solution from adminer: https://github.com/vrana/adminer/pull/367/files --- src/Platforms/PostgreSqlPlatform.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Platforms/PostgreSqlPlatform.php b/src/Platforms/PostgreSqlPlatform.php index 4d12a320..4bdb2761 100644 --- a/src/Platforms/PostgreSqlPlatform.php +++ b/src/Platforms/PostgreSqlPlatform.php @@ -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