MantisBT - TestLink
View Issue Details
0008500TestLinkInstallerpublic2018-12-10 17:542018-12-10 23:15
cyuste 
fman 
normalminoralways
resolvedfixed 
1.9.18 (2018 Q3) 
1.9.19 (2019 Q1) 
Postgres v10.5
v7.2.13
TBD
0008500: Postgresql installation script fails
I am trying to install the Testlink database using the web installer but it fails in the table creation(see additional information for the error log). I am using a AWS RDS Postgre DB v10.5, tried to run manually the sql script but also failed with this error:

psql:testlink_create_tables.sql:986: ERROR: relation "testcase_keywords" does not exist
LINE 6: AND NOT(EXISTS(SELECT 1 FROM /*prefix*/testcase_keywords T...



Processing:sql/postgres/testlink_create_tables.sql

 ==============================================================================
 DB Access Error - debug_print_backtrace() OUTPUT START
 ATTENTION: Enabling more debug info will produce path disclosure weakness (CWE-200)
            Having this additional Information could be useful for reporting
            issue to development TEAM.
 ==============================================================================
#0 database->exec_query(CREATE TABLE /*prefix*/keywords(
  "id" BIGSERIAL NOT NULL ,
  "keyword" VARCHAR(100) NOT NULL DEFAULT '',
  "testproject_id" BIGINT NOT NULL DEFAULT '0' REFERENCES /*prefix*/testprojects (id) ON DELETE CASCADE,
  "notes" TEXT NULL DEFAULT NULL,
  PRIMARY KEY ("id"),
)) called at [/var/www/testlink/install/sqlParser.class.php:98]
#1 SqlParser->process(sql/postgres/testlink_create_tables.sql) called at [/var/www/testlink/install/installNewDB.php:459]
No tags attached.
child of 0008397closed fman Availables hot-fixes for 1.9.18 & How To get full fixed package from GitHub 
Issue History
2018-12-10 17:54cyusteNew Issue
2018-12-10 18:24fmanNote Added: 0028310
2018-12-10 18:24fmanAssigned To => fman
2018-12-10 18:24fmanStatusnew => feedback
2018-12-10 20:21cyusteNote Added: 0028311
2018-12-10 20:21cyusteStatusfeedback => assigned
2018-12-10 23:13fmanNote Added: 0028312
2018-12-10 23:14fmanQA Team - Task Workflow Status => TBD
2018-12-10 23:14fmanNote Added: 0028313
2018-12-10 23:14fmanStatusassigned => resolved
2018-12-10 23:14fmanFixed in Version => 1.9.19 (2019 Q1)
2018-12-10 23:14fmanResolutionopen => fixed
2018-12-10 23:15fmanRelationship addedchild of 0008397
2018-12-10 23:15fmanProduct Version => 1.9.18 (2018 Q3)

Notes
(0028310)
fman   
2018-12-10 18:24   
please get latest code from github, do fresh install & provide feedback
(0028311)
cyuste   
2018-12-10 20:21   
Tested again, same result

git show
commit 4920b7b8b7f94328646cc281cfa190367d1d7461 (HEAD -> testlink_1_9, origin/testlink_1_9, origin/HEAD)
Author: fmancardi <francisco.mancardi@gmail.com>
Date: Mon Dec 10 19:17:02 2018 +0100

Tested now using Docker, I can change to a specific version of PostgreSQL if you think it's convenient but I have also tested in AWS RDS v9.6 and got the same result
(0028312)
fman   
2018-12-10 23:13   
"id" BIGSERIAL NOT NULL ,
  "keyword" VARCHAR(100) NOT NULL DEFAULT '',
  "testproject_id" BIGINT NOT NULL DEFAULT '0' REFERENCES /*prefix*/testprojects (id) ON DELETE CASCADE,
  "notes" TEXT NULL DEFAULT NULL,
  PRIMARY KEY ("id"),

this has to be changed to PRIMARY KEY ("id")
(0028313)
fman   
2018-12-10 23:14   
https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/2604cd1650e2316d83c3936fc8ca318d6ee67d9d [^]