mirror of
https://github.com/vrana/adminer.git
synced 2025-08-11 17:14:07 +02:00
PostgreSQL: Export all FKs after all CREATE TABLE
This commit is contained in:
@@ -105,6 +105,16 @@ SET foreign_key_checks = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// add FKs after creating tables (except in MySQL which uses SET FOREIGN_KEY_CHECKS=0)
|
||||
if (function_exists('foreign_keys_sql')) {
|
||||
foreach (table_status('', true) as $name => $table_status) {
|
||||
$table = (DB == "" || in_array($name, (array) $_POST["tables"]));
|
||||
if ($table && !is_view($table_status)) {
|
||||
echo foreign_keys_sql($name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($views as $view) {
|
||||
$adminer->dumpTable($view, $_POST["table_style"], 1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user