Add missing parentheses to CHECK export

This commit is contained in:
Jakub Vrana
2026-01-12 07:18:49 +01:00
parent 3856d0563e
commit 1109ca6389
2 changed files with 2 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
## Adminer dev
- Pretty print JSON in edit
- PostgreSQL: Offer foreign keys in create table
- PostgreSQL: Add missing parentheses to CHECK export
- PostgreSQL: Mark unique partial indexes as unique (bug #1172)
- ClickHouse: Fix offset (bug #1188)
- ClickHouse: Fix list of tables (bug #1176)

View File

@@ -971,7 +971,7 @@ AND typelem = 0"
}
foreach (driver()->checkConstraints($table) as $conname => $consrc) {
$return_parts[] = "CONSTRAINT " . idf_escape($conname) . " CHECK $consrc";
$return_parts[] = "CONSTRAINT " . idf_escape($conname) . " CHECK ($consrc)";
}
$return .= implode(",\n ", $return_parts) . "\n)";