Project

General

Profile

Actions

Bug #942

closed

LaunchedApplicationData timestamp is not initialized to not null

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

Status:
Closed
Priority:
Urgent
Assignee:
Amber Herold
Category:
-
Start date:
10/14/2010
Due date:
% Done:

80%

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

Description

this causes Leginon session not remember last launched application since a query for recent time fails.


Related issues 2 (0 open2 closed)

Related to Leginon - Task #953: Document 2.1 Upgrade procedureClosedAmber Herold10/20/2010

Actions
Has duplicate Appion - Bug #1148: DEF_timestamp is NULLClosedAmber Herold01/18/2011

Actions
Actions #1

Updated by Eric Hou over 13 years ago

Here is the sql script to update the previous "LaunchedApplicationData" table schema.

alter table LaunchedApplicationData modify `DEF_timestamp` timestamp not null default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP;

I will write a script to do the update.

Thanks.

Eric

Actions #2

Updated by Eric Hou over 13 years ago

  • Assignee changed from Anchi Cheng to Eric Hou
Actions #3

Updated by Eric Hou over 13 years ago

  • % Done changed from 0 to 80

finished the update script. It locates under dbschema folder call "leginondbUpdate-r14897.py".
If you don't like the name, feel free to change it.

Thanks.

Eric

Actions #4

Updated by Eric Hou over 13 years ago

  • Assignee changed from Eric Hou to Amber Herold
Actions #5

Updated by Eric Hou over 13 years ago

To test:
Don't use the newest leginonDBSchema.xml, (use the one does not have "null="NOT NULL" " on line 611) to create the default database.

From mysql command, type "show create table leginondb.LaunchedApplicationData"
you show see as follow:

LaunchedApplicationData | CREATE TABLE `LaunchedApplicationData` (
`DEF_id` int(16) NOT NULL AUTO_INCREMENT,
`DEF_timestamp` timestamp NULL DEFAULT NULL,
`REF|ApplicationData|application` int(20) DEFAULT NULL,
`SEQ|launchers` text,
`REF|SessionData|session` int(20) DEFAULT NULL,
PRIMARY KEY (`DEF_id`),
KEY `REF|SessionData|session` (`REF|SessionData|session`),
KEY `REF|ApplicationData|application` (`REF|ApplicationData|application`),
KEY `DEF_timestamp` (`DEF_timestamp`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1

after run this python script you should see as follow:

LaunchedApplicationData | CREATE TABLE `LaunchedApplicationData` (
`DEF_id` int(16) NOT NULL AUTO_INCREMENT,
`DEF_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`REF|ApplicationData|application` int(20) DEFAULT NULL,
`SEQ|launchers` text,
`REF|SessionData|session` int(20) DEFAULT NULL,
PRIMARY KEY (`DEF_id`),
KEY `REF|SessionData|session` (`REF|SessionData|session`),
KEY `REF|ApplicationData|application` (`REF|ApplicationData|application`),
KEY `DEF_timestamp` (`DEF_timestamp`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1

Actions #6

Updated by Amber Herold over 13 years ago

  • Status changed from New to In Code Review
Actions #7

Updated by Amber Herold over 13 years ago

  • Status changed from In Code Review to In Test
Actions #8

Updated by Amber Herold over 13 years ago

  • Status changed from In Test to Closed
Actions #9

Updated by Anchi Cheng over 13 years ago

merge to branch 2.1 in r14911

Actions #10

Updated by Anchi Cheng over 13 years ago

  • Affected Version changed from Appion/Leginon 2.0.0 to Appion/Leginon 2.1.0

It turns out that this bug was fixed in 2.0 branch as r14380 but was not merged back to the trunk.

Actions #11

Updated by Anchi Cheng over 13 years ago

Rename dbschema/leginonDBupdate-14897.py to schema-r14891,py to be consistent with other schema update scripts so that we can search them easily. r15106 did this but noticed that r14897 is not where the xml file was committed. r15096 corrected that.

Actions

Also available in: Atom PDF