Changes between Version 25 and Version 26 of Petascope_9.5


Ignore:
Timestamp:
Aug 15, 2017 1:09:39 PM (5 weeks ago)
Author:
bphamhuu
Comment:

Rename update_petascopedb.sh to migrate_petascopedb.sh

Legend:

Unmodified
Added
Removed
Modified
  • Petascope_9.5

    v25 v26  
    5858Petascope 9.5 uses Hibernate as ORM data model, and we cannot use `update_petascopedb.sh` with explicit SQL queries. To support different kinds of databases, we use the [http://www.liquibase.org/ Liquibase], which creates the changes for each update in XML and uses that to generate the SQL statements for the target database (e.g: Postgresql, MySql, HSQLDB, etc). A migration table is added in new Petascope database to lock the application when the process is running (to make sure multiple migrations are not happening at the same time).
    5959
    60 To perform migrations it is necessary to implement a small command-line java tool. This tool also uses Spring and Hibernate and can be invoked from the `update_petascopedb.sh` script. Below we outline the steps for migrating petascopedb.
     60To perform migrations it is necessary to implement a small command-line java tool. This tool also uses Spring and Hibernate and can be invoked from the `migrate_petascopedb.sh` script. Below we outline the steps for migrating petascopedb.
    6161
    62621. If using an embedded database like HSQLDB or H2, which does not support multiple connections from different applications, make sure that the (new) petascope 9.5 is stopped.
    63 1. Execute the migration script: `./update_petascopedb.sh`
     631. Execute the migration script: `./migrate_petascopedb.sh`
    64641. All coverages in pre 9.5 `petascopedb` will be read by the old `CoverageMetadata` model which is imported in the new petascope as a legacy package.
    65651. If coverage id doesn't exist in the new `petascopedb`, a process to translate from old `CoverageMetadata` model to CIS coverage data model is done and then persisted in `petascopedb`.