MantisBT - TestLink
View Issue Details
0003855TestLinkDatabase Postgrespublic2010-10-05 09:342010-10-09 08:00
haba713 
fman 
normalmajoralways
closedfixed 
LinuxSUSE Linux Enterprise Server10 SP3
testlink_1_9_rc1-qa-20100926 
1.9 RC 1 
PostgreSQL 8.1.21
5.2.5 with Suhosin-Patch 0.9.6
0003855: Upgrading from 1.8 to 1.9 does not work with PostgreSQL
For example

    ALTER TABLE /*prefix*/builds ADD COLUMN release_date DATE NOT NULL;

does not work if there's already data in the table because release_date for the existing rows is NULL.

This should be fixed by adding new column with no column constraints.

If the constraint is really needed, release_date for existing rows should be set to epoch or copied from creation_ts. After that the constraint can be added.

% psql testlink <<EOF
> ALTER TABLE /*prefix*/builds ADD COLUMN release_date DATE NOT NULL;
> EOF
ERROR: column "release_date" contains null values
No tags attached.
Issue History
2010-10-05 09:34haba713New Issue
2010-10-05 10:20fmanNote Added: 0011633
2010-10-05 10:22fmanStatusnew => resolved
2010-10-05 10:22fmanFixed in Version => 1.9 RC 1
2010-10-05 10:22fmanResolutionopen => fixed
2010-10-05 10:22fmanAssigned To => fman
2010-10-09 08:00fmanNote Added: 0011707
2010-10-09 08:00fmanStatusresolved => closed

Notes
(0011633)
fman   
2010-10-05 10:20   
Typo error
FROM
ALTER TABLE /*prefix*/builds ADD COLUMN release_date DATE NOT NULL;

TO
ALTER TABLE /*prefix*/builds ADD COLUMN release_date DATE NULL;
(0011707)
fman   
2010-10-09 08:00   
Release 1.9 RC1