MantisBT - TestLink
View Issue Details
0007574TestLinkDatabase Postgrespublic2016-05-29 18:492016-11-01 10:04
lczub 
fman 
normalmajoralways
closedfixed 
 
1.9.15 (2015 Q4) 
PostgreSQL 9.2.17
TBD
0007574: missing SET DATA TYPE statement in postgres\DB.1.9.15\step1\db_schema_update.sql
trying to upgrade my TL 1.9.14 installation, running on PostgreSQL 9.2.17 with
- alter_tables\1.9.15\postgres\DB.1.9.15\step1\db_schema_update.sql
fails, cause the psql command ALTER TABLE is called with a wrong syntax

The subform defintion SET DATA TYPE is missing - details see https://www.postgresql.org/docs/9.2/static/sql-altertable.html [^]

also table definition req_notify_assignments is missing (see ticket 7528 for MySQL)

psql -h localhost -U tlink -f alter_tables\1.9.15\postgres\DB.1.9.15\step1\db_schema_update.sql testlink

psql:db_schema_update.sql:14: FEHLER: Syntaxfehler bei »VARCHAR«
ZEILE 1: ALTER TABLE /*prefix*/users ALTER COLUMN "login" VARCHAR(100...
                                                          ^
psql:db_schema_update.sql:15: FEHLER: Syntaxfehler bei »VARCHAR«
ZEILE 1: ALTER TABLE /*prefix*/users ALTER COLUMN "first" VARCHAR(50)...
                                                          ^
psql:db_schema_update.sql:16: FEHLER: Syntaxfehler bei »VARCHAR«
Suggestion for Fix:

Replace the three lines

ALTER TABLE /*prefix*/users ALTER COLUMN "login" VARCHAR(100);
ALTER TABLE /*prefix*/users ALTER COLUMN "first" VARCHAR(50);
ALTER TABLE /*prefix*/users ALTER COLUMN "last" VARCHAR(50);

with

ALTER TABLE /*prefix*/users ALTER COLUMN "login" SET DATA TYPE VARCHAR(100);
ALTER TABLE /*prefix*/users ALTER COLUMN "first" SET DATA TYPE VARCHAR(50);
ALTER TABLE /*prefix*/users ALTER COLUMN "last" SET DATA TYPE VARCHAR(50);
No tags attached.
Issue History
2016-05-29 18:49lczubNew Issue
2016-05-30 17:27fmanNote Added: 0024909
2016-10-30 18:06lczubNote Added: 0025546
2016-11-01 10:04fmanQA Team - Task Workflow Status => TBD
2016-11-01 10:04fmanStatusnew => closed
2016-11-01 10:04fmanAssigned To => fman
2016-11-01 10:04fmanResolutionopen => fixed
2016-11-01 10:04fmanFixed in Version => 1.9.15 (2015 Q4)

Notes
(0024909)
fman   
2016-05-30 17:27   
thanks for help
(0025546)
lczub   
2016-10-30 18:06   
This is fixed with final 1.9.15 Testlink Release and can be closed