Skip to content

Commit 03ca345

Browse files
committed
Fix column type check on PostgreSQL 12+.
1 parent 96b6c61 commit 03ca345

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Console/GenerateCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ public function enumValues($model, $table, $name)
391391
$types = DB::connection($model->getConnectionName())
392392
->select(DB::raw("
393393
select matches[1]
394-
from pg_constraint, regexp_matches(consrc, '''(.+?)''', 'g') matches
394+
from pg_constraint, regexp_matches(pg_get_constraintdef(\"oid\"), '''(.+?)''', 'g') matches
395395
where contype = 'c'
396396
and conname = '{$table}_{$name}_check'
397397
and conrelid = 'public.{$table}'::regclass;

0 commit comments

Comments
 (0)