Alter bit type default value
This commit is contained in:
parent
cbdf09d868
commit
4ff2f03a0f
|
@ -472,7 +472,7 @@ username.form['driver'].onchange();
|
||||||
return $value; // SQL injection
|
return $value; // SQL injection
|
||||||
}
|
}
|
||||||
$name = $field["field"];
|
$name = $field["field"];
|
||||||
$return = ($field["type"] == "bit" && ereg('^[0-9]+$', $value) ? $value : q($value));
|
$return = ($field["type"] == "bit" && ereg("^([0-9]+|b'[0-1]+')\$", $value) ? $value : q($value));
|
||||||
if (ereg('^(now|getdate|uuid)$', $function)) {
|
if (ereg('^(now|getdate|uuid)$', $function)) {
|
||||||
$return = "$function()";
|
$return = "$function()";
|
||||||
} elseif (ereg('^current_(date|timestamp)$', $function)) {
|
} elseif (ereg('^current_(date|timestamp)$', $function)) {
|
||||||
|
@ -784,6 +784,7 @@ DROP PROCEDURE adminer_alter;
|
||||||
foreach (array("bac", "bra", "sqlite_quo", "mssql_bra") as $val) {
|
foreach (array("bac", "bra", "sqlite_quo", "mssql_bra") as $val) {
|
||||||
echo "jushLinks.$val = jushLinks.$jush;\n";
|
echo "jushLinks.$val = jushLinks.$jush;\n";
|
||||||
}
|
}
|
||||||
|
echo "var cmComplete = [ '" . implode("', '", array_map('js_escape', array_keys($tables))) . "' ];\n";
|
||||||
echo "</script>\n";
|
echo "</script>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,7 +176,7 @@ function process_field($field, $type_field) {
|
||||||
idf_escape($field["field"]),
|
idf_escape($field["field"]),
|
||||||
process_type($type_field),
|
process_type($type_field),
|
||||||
($field["null"] ? " NULL" : " NOT NULL"), // NULL for timestamp
|
($field["null"] ? " NULL" : " NOT NULL"), // NULL for timestamp
|
||||||
(isset($field["default"]) ? " DEFAULT " . (($field["type"] == "timestamp" && eregi('^CURRENT_TIMESTAMP$', $field["default"])) || ($field["type"] == "bit" && ereg('^[0-9]+$', $field["default"])) ? $field["default"] : q($field["default"])) : ""),
|
(isset($field["default"]) ? " DEFAULT " . (($field["type"] == "timestamp" && eregi('^CURRENT_TIMESTAMP$', $field["default"])) || ($field["type"] == "bit" && ereg("^([0-9]+|b'[0-1]+')\$", $field["default"])) ? $field["default"] : q($field["default"])) : ""),
|
||||||
($field["on_update"] ? " ON UPDATE $field[on_update]" : ""),
|
($field["on_update"] ? " ON UPDATE $field[on_update]" : ""),
|
||||||
(support("comment") && $field["comment"] != "" ? " COMMENT " . q($field["comment"]) : ""),
|
(support("comment") && $field["comment"] != "" ? " COMMENT " . q($field["comment"]) : ""),
|
||||||
($field["auto_increment"] ? auto_increment() : null),
|
($field["auto_increment"] ? auto_increment() : null),
|
||||||
|
|
|
@ -2,6 +2,7 @@ Adminer 3.3.0-dev:
|
||||||
Use Esc to disable in-place edit
|
Use Esc to disable in-place edit
|
||||||
Highlight SQL code in textarea
|
Highlight SQL code in textarea
|
||||||
Append new index with auto index selection (bug #3282127)
|
Append new index with auto index selection (bug #3282127)
|
||||||
|
Bit type default value
|
||||||
Autocomplete for big foreign keys (Editor)
|
Autocomplete for big foreign keys (Editor)
|
||||||
Customizable favicon (customization)
|
Customizable favicon (customization)
|
||||||
Method name can return a link (customization)
|
Method name can return a link (customization)
|
||||||
|
|
Loading…
Reference in a new issue