MantisBT - TestLink
View Issue Details
0004040TestLinkInstallerpublic2010-11-20 10:312015-09-20 09:48
fman 
fman 
normalminorN/A
closedfixed 
1.9 (Prague) 
 
ALL
TBD
0004040: Migration problems (Container Issue)
Just to group on one issue all problem reported
Migration
parent of 0003245closed fman [MIGRATION] Can not migrate data because of incorrect data in custom fields 
parent of 0004033closed fman [MIGRATION] - Error upgrading from 1.8.5 to 1.9.0 MS SQL Server 2005 
parent of 0004030closed fman error log contains: PHP Notice: Undefined index: installationType in installCheck.php on line 40 
parent of 0004010closed fman [MIGRATION] [POSTGRES] - updating from 1.8 to 1.9 rc1 fails 
zip testlink-1.8.5-mssql-db-with-data-upgrade-test.zip (450,950) 2010-11-22 02:16
http://mantis.testlink.org/file_download.php?file_id=1986&type=bug
zip fix-4040.zip (32,036) 2010-12-13 21:02
http://mantis.testlink.org/file_download.php?file_id=2033&type=bug
log mssql-upgrade-errors-userlog0.log (474,187) 2010-12-15 03:19
http://mantis.testlink.org/file_download.php?file_id=2039&type=bug
zip fix-4040-new.zip (40,287) 2010-12-19 16:11
http://mantis.testlink.org/file_download.php?file_id=2055&type=bug
png cannot-view-test-cases.png (82,489) 2010-12-21 06:38
http://mantis.testlink.org/file_download.php?file_id=2061&type=bug
png
Issue History
2010-11-20 10:31fmanNew Issue
2010-11-20 10:31fmanRelationship addedparent of 0003245
2010-11-20 10:32fmanTag Attached: Migration
2010-11-20 10:33fmanRelationship addedparent of 0004033
2010-11-20 10:38fmanRelationship addedparent of 0004030
2010-11-20 10:51fmanFile Added: fix-4040.zip
2010-11-20 10:52fmanAssigned To => fman
2010-11-20 10:52fmanStatusnew => assigned
2010-11-20 10:56fmanRelationship addedparent of 0004010
2010-11-22 02:16leolFile Added: testlink-1.8.5-mssql-db-with-data-upgrade-test.zip
2010-11-22 02:21leolNote Added: 0012699
2010-12-13 21:01fmanFile Deleted: fix-4040.zip
2010-12-13 21:02fmanFile Added: fix-4040.zip
2010-12-13 21:03fmanNote Added: 0012962
2010-12-15 03:17leolNote Added: 0012983
2010-12-15 03:19leolFile Added: mssql-upgrade-errors-userlog0.log
2010-12-15 03:26leolNote Edited: 0012983bug_revision_view_page.php?bugnote_id=12983#r731
2010-12-15 09:51fmanNote Added: 0012990
2010-12-15 10:17leolNote Added: 0012994
2010-12-19 16:11fmanFile Added: fix-4040-new.zip
2010-12-19 16:13fmanNote Added: 0013036
2010-12-19 16:13fmanStatusassigned => feedback
2010-12-21 06:37leolNote Added: 0013047
2010-12-21 06:38leolFile Added: cannot-view-test-cases.png
2015-05-19 19:18Mr.BricodageNote Added: 0023377
2015-05-19 19:18Mr.BricodageRelationship addedchild of 0007083
2015-09-09 09:46Mr.BricodageRelationship deletedchild of 0007083
2015-09-20 09:48fmanQA Team - Task Workflow Status => TBD
2015-09-20 09:48fmanStatusfeedback => closed
2015-09-20 09:48fmanResolutionopen => fixed

Notes
(0012699)
leol   
2010-11-22 02:21   
Following on from issue 4033.
Tested the fixes from the file “fix-4040.zip” with a fresh install of testlink 1.8.5 MS SQL Server DB with no data, upgrade and migration completed without obvious error messages.

Then tested the fixes from the file “fix-4040.zip” with a testlink 1.8.5 MS SQL Server DB with data and found further upgrade and migration issues.

The observered errors are:
1) Errors with the statement "ALTER TABLE /*prefix*/builds ADD relase_date datetime NOT NULL;" in install\sql\alter_tables\1.9\mssql\DB.1.3\step1\db_schema_update.sql
   a) “relase_date” column name has a spelling mistake, it should be “release_date”
   b) datetime cannot be NOT NULL (see userlog0.log with attachment)

2) There are missing tables after upgrade. When comparing the mysql script in install\sql\alter_tables\1.9\mysql\DB.1.3\step1\db_schema_update.sql and the MS SQL Server script in install\sql\alter_tables\1.9\mssql\DB.1.3\step1\db_schema_update.sql there are numerous discreprencies which should also be needed in the mssql scripts.

3) Other migration errors in the log and web interface output.

Please use the db from "testlink-1.8.5-mssql-db-with-data-upgrade-test.zip" to reproduce the errors above.
(0012962)
fman   
2010-12-13 21:03   
PLease get new version of fix and retest
(0012983)
leol   
2010-12-15 03:17   
(edited on: 2010-12-15 03:26)
Tried the new fix-4040.zip but still having the three issues described in my post from 2010-11-21 18:21.

1) Errors in the statement "ALTER TABLE /*prefix*/builds ADD relase_date datetime NOT NULL;"
a)"relase_date" column contains typo and should be "release_date"
   b)datetime cannot be NOT NULL

2) The list of discreprencies when comparing MSSQL and MYSQL db_schema_update.sql script
   a) Missing new tables
       - req_versions
       - req_relations
       - tcsteps
       - platforms
       - testplan_platforms
       - inventory
   b) Missing alter statements
       - ALTER TABLE /*prefix*/builds ...

       - ALTER TABLE /*prefix*/cfield_design_values MODIFY COLUMN value varchar(4000) NOT NULL default '';
       - ALTER TABLE /*prefix*/cfield_execution_values MODIFY COLUMN value varchar(4000) NOT NULL default '';
       - ALTER TABLE /*prefix*/cfield_testplan_design_values MODIFY COLUMN value varchar(4000) NOT NULL default '';
  
       - ALTER TABLE /*prefix*/custom_fields MODIFY COLUMN possible_values ...
       - ALTER TABLE /*prefix*/custom_fields MODIFY COLUMN default_value ...

       - ALTER TABLE /*prefix*/tcversions ADD COLUMN layout ...
       - ALTER TABLE /*prefix*/tcversions ADD COLUMN `status` ...
       - ALTER TABLE /*prefix*/tcversions ADD COLUMN preconditions ...

       - ALTER TABLE /*prefix*/testplan_tcversions ADD COLUMN platform_id ...

       - DROP INDEX ON /*prefix*/testplan_tcversions ...
       - CREATE UNIQUE INDEX ON /*prefix*/testplan_tcversions ...

       - ALTER TABLE /*prefix*/executions ...
       - ALTER TABLE /*prefix*/milestones ...
       - ALTER TABLE /*prefix*/req_specs ...
       - ALTER TABLE /*prefix*/requirements ...

Errors log file attached. mssql-upgrade-errors-userlog0.log

(0012990)
fman   
2010-12-15 09:51   
fix is amined to MYSQL and POSTGRES
(0012994)
leol   
2010-12-15 10:17   
For the other guys to test then...

I'm more concerned with MSSQL.
(0013036)
fman   
2010-12-19 16:13   
@leol
Please use new fix attached (fix-4040-new.zip)
Important NOTICE:
you will need to do some changes MANUALLY due to MSSQL limitations

let us know
(0013047)
leol   
2010-12-21 06:37   
Thanks for the patch.
I tried the 1.8.5 to 1.9 MS SQL Server upgrade and applied the follow DB changes manually.

1) ALTER TABLE /*prefix*/requirements ALTER column req_doc_id VARCHAR(64)
2) Recreated custom_fields table with columns possible_values and default_value set to varchar(4000)
3) Manually dropped status,node_order,creation_ts for table requirements.
4) Manually dropped 'option_reqs','option_priority','option_automation' for table testprojects.

After upgrading, I can login and view the list of test cases but when I click a test case to view it. It doesn't load up in the right hand pane and timesout.

I don't see any errors in the logs but the last two entries after I click on the test case 1 is:

[<<][4d1041ac2b50f051311157][DEFAULT][/testlink-1.9.0/lib/testcases/archiveData.php][10/Dec/21 05:57:00][10/Dec/21 05:57:00][took 0.278784 secs]
[>>][4d1041ac715d1036404146][DEFAULT][/testlink-1.9.0/lib/testcases/archiveData.php][10/Dec/21 05:57:00]

Also see image attached.
(0023377)
Mr.Bricodage   
2015-05-19 19:18   
version 1.8.x not supported anymore.
Should be closed