mirror of
https://github.com/vrana/adminer.git
synced 2026-02-08 15:47:47 +01:00
PostgreSQL: Remove duplicate DEFERRABLE in foreign key export
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
- Pretty print JSON in edit
|
||||
- PostgreSQL: Offer foreign keys in create table
|
||||
- PostgreSQL: Add missing parentheses to CHECK export
|
||||
- PostgreSQL: Remove duplicate DEFERRABLE in foreign key export
|
||||
- PostgreSQL: Mark unique partial indexes as unique (bug #1172)
|
||||
- ClickHouse: Fix offset (bug #1188)
|
||||
- ClickHouse: Fix list of tables (bug #1176)
|
||||
|
||||
@@ -912,7 +912,7 @@ AND typelem = 0"
|
||||
ksort($fkeys);
|
||||
|
||||
foreach ($fkeys as $fkey_name => $fkey) {
|
||||
$return .= "ALTER TABLE ONLY " . idf_escape($status['nspname']) . "." . idf_escape($status['Name']) . " ADD CONSTRAINT " . idf_escape($fkey_name) . " $fkey[definition] " . ($fkey['deferrable'] ? 'DEFERRABLE' : 'NOT DEFERRABLE') . ";\n";
|
||||
$return .= "ALTER TABLE ONLY " . idf_escape($status['nspname']) . "." . idf_escape($status['Name']) . " ADD CONSTRAINT " . idf_escape($fkey_name) . " $fkey[definition];\n";
|
||||
}
|
||||
|
||||
return ($return ? "$return\n" : $return);
|
||||
|
||||
Reference in New Issue
Block a user