Skip to content

Commit

Permalink
Merge pull request #85 from HonzaMatosik/pr/postgres-12-compatibility
Browse files Browse the repository at this point in the history
PostgreSqlPlatform: Compatibility fix for Postgres 12
  • Loading branch information
hrach committed Feb 13, 2020
2 parents 0a664d2 + 9e4022a commit e02b70d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Platforms/PostgreSqlPlatform.php
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 e02b70d

Please sign in to comment.