1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 15:47:00 +02:00

MS SQL schema support

This commit is contained in:
Jakub Vrana
2010-05-11 16:45:04 +02:00
parent 7f3ccd3b51
commit 60c7ed9a61
14 changed files with 124 additions and 73 deletions

View File

@@ -6,9 +6,9 @@ $trigger_event = array("INSERT", "UPDATE", "DELETE");
$dropped = false;
if ($_POST && !$error && in_array($_POST["Timing"], $trigger_options["Timing"]) && in_array($_POST["Event"], $trigger_event) && in_array($_POST["Type"], $trigger_options["Type"])) {
$timing_event = " $_POST[Timing] $_POST[Event]";
$on = " ON " . idf_escape($TABLE);
$on = " ON " . table($TABLE);
$dropped = drop_create(
"DROP TRIGGER " . idf_escape($_GET["name"]) . ($jush == "pgsql" ? " ON " . idf_escape($TABLE) : ""),
"DROP TRIGGER " . idf_escape($_GET["name"]) . ($jush == "pgsql" ? $on : ""),
"CREATE TRIGGER " . idf_escape($_POST["Trigger"]) . ($jush == "mssql" ? $on . $timing_event : $timing_event . $on) . " $_POST[Type]\n$_POST[Statement]",
ME . "table=" . urlencode($TABLE),
lang('Trigger has been dropped.'),