]> git.joonet.de Git - adminer.git/commitdiff
Return accidentally removed error message
authorJakub Vrana <jakub@vrana.cz>
Wed, 5 Mar 2025 11:29:48 +0000 (12:29 +0100)
committerJakub Vrana <jakub@vrana.cz>
Wed, 5 Mar 2025 12:10:41 +0000 (13:10 +0100)
adminer/foreign.inc.php

index f48291ea972e440d25190b12fdf6dc84db260b86..ce54666b4ee2d06e9f5b79368dee3899f03d1be7 100644 (file)
@@ -30,6 +30,9 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["change"] && !$_POST["change-
                ($row["drop"] ? lang('Foreign key has been dropped.') : ($name != "" ? lang('Foreign key has been altered.') : lang('Foreign key has been created.'))),
                $result
        );
+       if (!$row["drop"]) {
+               $error = "$error<br>" . lang('Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.'); //! no partitioning
+       }
 }
 
 page_header(lang('Foreign key'), $error, array("table" => $TABLE), h($TABLE));