Project

General

Profile

Actions

Bug #663

closed

r14379 change makes new database default tables having wrong DEF_timestamp definition

Added by Anchi Cheng over 14 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
High
Assignee:
Eric Hou
Category:
-
Start date:
06/16/2010
Due date:
% Done:

100%

Estimated time:
Affected Version:
Appion/Leginon 2.0.1
Show in known bugs:
No
Workaround:

Description

DEF_timestamp becomes allow null, current_timestamp is not the default, and the attribute "on update current_timestamp" is also gone. This caused leginondata.LaunchedApplicationData query to fail because it needs to query timestamp but timestamp is not automatically inserted without the right definition.

proposed change:

@ -59,7 +59,7 @
$fname = $v['attributes']['name'];
$ftype = $v['attributes']['type'];
$fnull = empty($v['attributes']['null']) ? 'null' : $v['attributes']['null'];
- $fextra = empty($v['attributes']['extra']) ? 'null' : $v['attributes']['extra'];
+ $fextra = empty($v['attributes']['extra']) ? '' : $v['attributes']['extra'];
$fields[] = "`$fname` $ftype $fnull $fextra";
$fieldtypes[$fname] = $ftype;
}

Actions

Also available in: Atom PDF