mysqlmariadbtestlink

Testlink upgrade got issue "You need to proceed with Manual upgrade of your DB scheme to DB 1.9.15"


I'm using xampp to handle php, mysql and apahce. The older version xampp is using the MySQL, and the latest version is using the MariaDB. I'm upgrade xampp and testlink as below:

  1. In older version xampp (v5.6.8), # mysqldump -u root -p testlink > ~/backup.sql
  2. Stop the lampp service and backup order version lampp: # mv /opt/lampp /opt/lampp.bak
  3. Install new version lampp-linux v5.6.24-1.run
  4. Download and install the latest verion testlink (v1.9.15) to /opt/lampp/htdocs/testlink
  5. Update couple of configuration files, so http://localhost/phpmyadmin can be visited
  6. http://localhost/testlink/install/default.php to start a new install, after that, http://localhost/testlink can be visit and also login by admin.
  7. restore the mysql data which has been dumpped in step 1: # mysql -u root -p testlink < ~/backup.sql

Then http://localhost/testlink/login.php shows:

You need to proceed with Manual upgrade of your DB scheme to DB 1.9.15

  • Read README file!

I've also checked the http://localhost/testlink/README:

  • Upgrade from 1.9.14 to 1.9.15 WARNING: if you are using a table prefix replace /prefix/ with your prefix

a) Execute install/sql/alter_tables/1.9.15/<your_db>/DB.1.9.15/step1/db_schema_update.sql

b) Execute (IF EXISTS) install/sql/alter_tables/1.9.15/<your_db>/DB.1.9.15/stepZ/z_final_step.sql

But I don't know how to execute a sql script in commandline.

====

Can anyone help me?


Solution

  • Okay, finally I understand how to update the db schame. Here is the way:

    # mysql -u root -p
    MariaDB [(none)]> use testlink;
    MariaDB [testlink]> source /opt/lampp/htdocs/testlink/install/sql/alter_tables/1.9.14/mysql/DB.1.9.14/step1/db_schema_update.sql
    MariaDB [testlink]> source /opt/lampp/htdocs/testlink/install/sql/alter_tables/1.9.14/mysql/DB.1.9.14/stepZ/z_final_step.sql
    MariaDB [testlink]> source /opt/lampp/htdocs/testlink/install/sql/alter_tables/1.9.15/mysql/DB.1.9.15/step1/db_schema_update.sql
    MariaDB [testlink]> source /opt/lampp/htdocs/testlink/install/sql/alter_tables/1.9.15/mysql/DB.1.9.15/stepZ/z_final_step.sql
    

    DONE!

    The truth is, want to upgrade a lower version testlink to a higher version, then it should be execute the /opt/lampp/htdocs/testlink/install/sql/alter_tables/**/step1/db_schema_update.sql and /opt/lampp/htdocs/testlink/install/sql/alter_tables/**/stepZ/db_schema_update.sql step by step. For example, if want to upgrade testlink from 1.9.10 to 1.9.15, then the db schema should be upgrade as below:

    1. 1.9.10 -> 1.9.11
    2. 1.9.11 -> 1.9.12
    3. 1.9.12 -> 1.9.13
    4. 1.9.13 -> 1.9.14
    5. 1.9.14 -> 1.9.15