mirror of
https://github.com/vrana/adminer.git
synced 2025-08-12 09:34:10 +02:00
Detect removed default (thanks to cvicebni ubor)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1109 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -124,7 +124,7 @@ function process_field($field, $type_field) {
|
||||
global $dbh;
|
||||
return idf_escape($field["field"]) . process_type($type_field)
|
||||
. ($field["null"] ? " NULL" : " NOT NULL") // NULL for timestamp
|
||||
. (!$field["has_default"] || $field["auto_increment"] || ereg('text|blob', $field["type"]) ? "" : " DEFAULT " . ($field["type"] == "timestamp" && eregi("^CURRENT_TIMESTAMP( on update CURRENT_TIMESTAMP)?$", $field["default"]) ? $field["default"] : $dbh->quote($field["default"])))
|
||||
. (!isset($field["default"]) || $field["auto_increment"] || ereg('text|blob', $field["type"]) ? "" : " DEFAULT " . ($field["type"] == "timestamp" && eregi("^CURRENT_TIMESTAMP( on update CURRENT_TIMESTAMP)?$", $field["default"]) ? $field["default"] : $dbh->quote($field["default"])))
|
||||
. " COMMENT " . $dbh->quote($field["comment"])
|
||||
;
|
||||
}
|
||||
|
Reference in New Issue
Block a user