diff options
author | Marc Delisle <marc@infomarc.info> | 2005-04-01 21:19:38 +0400 |
---|---|---|
committer | Marc Delisle <marc@infomarc.info> | 2005-04-01 21:19:38 +0400 |
commit | 6289ccb49ca6e415e43f4a24fb3ee3337fec186e (patch) | |
tree | eb1aa542ea3525a8f64b6037070348681da4629b | |
parent | 5dc8c5152c951bea943428fad40ea58d076c6e11 (diff) |
default current_timestamp is only for TIMESTAMP
-rwxr-xr-x | ChangeLog | 2 | ||||
-rw-r--r-- | libraries/common.lib.php | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -7,6 +7,8 @@ $Source$ 2005-04-01 Marc Delisle <lem9@users.sourceforge.net> * tbl_addfield.php: TIMESTAMP options support + * libraries/common.lib.php: DEFAULT CURRENT_TIMESTAMP is only + for TIMESTAMP (bug when changing from a TIMESTAMP to a non-TIMESTAMP type) 2005-03-31 Alexander M. Turek <me@derrabus.de> * left.php: Undefined offset (Bug #1174045). diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 4c5dab42c1..1de0a957cf 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -2533,7 +2533,7 @@ if (typeof(document.getElementById) != 'undefined' $query .= PMA_generateCharsetQueryPart($collation); } - if ($default_current_timestamp) { + if ($default_current_timestamp && strtoupper($full_field_type) == 'TIMESTAMP') { $query .= ' DEFAULT CURRENT_TIMESTAMP'; } elseif (!empty($default)) { if (strtoupper($default) == 'NULL') { |