MantisBT - TestLink
View Issue Details
0008169TestLinkMigration/Upgrade Testlinkpublic2017-12-29 19:572017-12-30 10:13
lczub 
fman 
normalmajoralways
closedfixed 
 
1.9.17 (2018 Q1) 
psql 9.6.6
READY FOR TESTING
0008169: problems with 1.9.17 sql migration scripts (github)
The 1.9.17 sql migration scripts with commit state d2d8d9e have several problems

a) wrong ids for new rights *codetracker_management* and *codetracker_view*

Installation scripts define the ids 51 and 52, the migration scripts define the ids 50 and 51, which creates a conflict with right *monitor_requirement*


b) db_udf_update.sql includes invalid comment sign # instead --

Executing the psql migrations script *alter_tables/1.9.17/postgres/DB.1.9.17/step1/db_udf_update.sql* aborts, cause the file includes not allowed comment sign # instead --

The analogue mysql migration file also includes this comment sign. Unclear if mysql allows this.
For mssql no such migration file exist. Unknown, if necessary.

Sample *install/sql/postgres/testlink_create_default_data.sql*
```
INSERT INTO /*prefix*/rights (id,description) VALUES (50,'monitor_requirement');
INSERT INTO /*prefix*/rights (id,description) VALUES (51,'codetracker_management');
INSERT INTO /*prefix*/rights (id,description) VALUES (52,'codetracker_view');
...
INSERT INTO /*prefix*/role_rights (role_id,right_id) VALUES (8,50);
INSERT INTO /*prefix*/role_rights (role_id,right_id) VALUES (8,51);
INSERT INTO /*prefix*/role_rights (role_id,right_id) VALUES (8,52);
```

Sample *alter_tables/1.9.17/postgres/DB.1.9.17/step1/db_schema_update.sql*
```
INSERT INTO /*prefix*/rights (id,description) VALUES (50,'monitor_requirement');
...
INSERT INTO /*prefix*/role_rights (role_id,right_id) VALUES (8,50);
...
INSERT INTO /*prefix*/rights (id,description) VALUES (50,'codetracker_management');
INSERT INTO /*prefix*/rights (id,description) VALUES (51,'codetracker_view');
INSERT INTO /*prefix*/role_rights (role_id,right_id) VALUES (8,50);
INSERT INTO /*prefix*/role_rights (role_id,right_id) VALUES (8,51);
```

Sample *alter_tables/1.9.17/postgres/DB.1.9.17/step1/db_udf_update.sql*

```
# TestLink Open Source Project - http://testlink.sourceforge.net/ [^]
# This script is distributed under the GNU General Public License 2 or later.
# ---------------------------------------------------------------------------------------
# @filesource testlink_create_udf0.sql
#
#
```
No tags attached.
Issue History
2017-12-29 19:57lczubNew Issue
2017-12-29 22:11Mr.BricodageNote Added: 0027121
2017-12-30 09:38fmanNote Added: 0027124
2017-12-30 09:39fmanNote Added: 0027125
2017-12-30 10:13fmanQA Team - Task Workflow Status => READY FOR TESTING
2017-12-30 10:13fmanNote Added: 0027126
2017-12-30 10:13fmanStatusnew => resolved
2017-12-30 10:13fmanResolutionopen => fixed
2017-12-30 10:13fmanAssigned To => fman
2017-12-30 10:13fmanStatusresolved => closed
2017-12-30 10:13fmanFixed in Version => 1.9.17 (2018 Q1)

Notes
(0027121)
Mr.Bricodage   
2017-12-29 22:11   
Fix to a) is included in https://github.com/TestLinkOpenSourceTRMS/testlink-code/pull/136 [^]
(0027124)
fman   
2017-12-30 09:38   
@user Thanks a lot => my fault
(0027125)
fman   
2017-12-30 09:39   
fix for (a) applied
(0027126)
fman   
2017-12-30 10:13   
https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/63d4fcae13a869576102bc29640520305ec5676c [^]