Changes between Version 14 and Version 15 of Petascope_9.5

Jul 3, 2017 11:47:25 AM (4 weeks ago)

add the description for how migration script will work


  • Petascope_9.5

    v14 v15  
     46Before version 9.5, is a script to update old petascopedb in Postgresql with some changes, such as: add some columns, tables, triggers, functions,...Every change in petascopedb was marked as a update version (current version is .17). This script cannot rollback to previous version of petascopedb (e.g: version .17 to version .8). This script has a big disadvantage is: it can only run and update to Postgresql as the SQL syntax are different from every Relational Database.
     48Therefore, in new Petascope with using Hibernate as ORM data model, we cannot add the SQL queries explicitly anymore. To support different kinds of Relation Database, we use the Liquibase which could create the changes for each version to XML and later on generated to target SQL syntax of the current database (e.g: Postgresql, MySql, HSQL,...). There is a migration table is added in new Petascope database to lock the application when the process is running (i.e: no multiple migrations are doing at the same time).
     50We will make a small Java Application to migrate from  old petascopedb to petascopedb_cis. This application also uses Spring and Hibernate and can be invoked from script (i.e: no expose the service to migrate in new Petascope).
     52Below are the description of the migration from old database to new database:
     54NOTE: if you are using an embedded Database like HSQLDB, H2,... which does not support multiple connections from different application, you will need to stop the current running Petascope (either Tomcat external or embedded) first.
     56* User execute the script by:
     60* All the imported coverages in old petascopedb will be read by old CoverageMetadata model which is imported to new Petascope as a legacy package.
     61* The migration process will check if coverage id exists in new petascopedb_cis. If it does not, a process to translate from old CoverageMetadata model to CIS Coverage data model is done and then persist this new object to new database.
     62* While running the migration, all the services to the new Petascope web application, such as: WCS, WCPS, WMS, WCST will not available to make sure data is migrated safely.
     64NOTE: The old database is kept after the migration as if new Petascope might not work correctly, then user can switch back to old Petascope and old petascopedb.
     65This could be done because, in version 9.5, old petascope deployed in old Tomcat will be renamed from rasdaman.war to rasdaman.war.bak, the is already backuped to by script. Then, user can rollback to use the old Petacope without any problem, just by renaming the new Petascope (rasdaman.war, to and, then unrename the old ones (rasdaman.war.bak and
    4668= List of tested databases [=#list_jdbc]