Page 1 of 1

Automatic Database Migration Process

Posted: Thu Jun 21, 2018 3:00 pm
by Phoenix880
Hi!

To upgrade OpenKM, it is currently necessary to run manual SQL and "Java Code" scripts. To run Open KM with Docker in a fully automated cloud environment, I need an automatic migration.

Are there plans to introduce a migration engine like Liquibase or Flyway into OpenKM?

Re: Automatic Database Migration Process

Posted: Fri Jun 22, 2018 12:07 pm
by jllort
Professional edition comes with tool what automatically does it, but community edition still does not have.

If Liquidbase and Flyway are relational databases supported by hibernate 3.x, then should be working now for community version. Professional version works with upper hibernate version 5.x ( that's because community is the 3-4 years ago professional version released as community, this is the way of how we release the software to the community ).

Re: Automatic Database Migration Process

Posted: Fri Jun 22, 2018 2:13 pm
by Phoenix880
Where can I find further information about the migration tool in professional edition ? Which steps are reqired to migrate the database in professional edition?

Liquibase and Flyway are not relational databases but migration engines (frameworks) for databases.

Re: Automatic Database Migration Process

Posted: Fri Jun 22, 2018 4:28 pm
by jllort
If are not realtional databases then I think will not working with OpenKM now.

Re: Automatic Database Migration Process

Posted: Thu Jun 28, 2018 10:44 am
by Phoenix880
Where can I find further information about the migration tool in professional edition ? Which steps are reqired to migrate the database in professional edition?

Automatic migration is an important feature for us, and a reason to switch to professional edition.

Re: Automatic Database Migration Process

Posted: Fri Jun 29, 2018 6:08 am
by pavila
In OpenKM Professional there is a tool which do the required steps to update a given OpenKM instance to a newer version. This implies SQL statements, HQL statements and BeanShell code which perform the required tasks. You just download the tool, execute it and it will download automatically the newer OpenKM release and will perform these tasks. These are the detailed steps:
  • Check if it's located at $TOMCAT_HOME folder, otherwise will raise an error message.
  • Ask for some information to the administrator.
  • Check the service configuration, the user connection and the OpenKM version.
  • If the utility is successful on these checks, it will require confirmation by the user to proceed with upgrade [y/N].
  • Download the new OpenKM.war file ( current version + 1).
  • When finished downloading, it will execute pre-upgrade actions.
  • Stop OpenKM.
  • Replace the old OpenKM.war file by the new downloaded one.
  • Modify the parameter hibernate.hbm2ddl to update into the file $TOMCAT_HOME/OpenKM.cfg.
  • Start OpenKM again.
  • Check if OpenKM is already available and then execute post-upgrade actions.

Re: Automatic Database Migration Process

Posted: Mon Jul 02, 2018 7:15 am
by Phoenix880
We run OpenKM in a Docker Container with the official OpenKM Image:
https://hub.docker.com/r/openkm/openkm/

1. Is there a Docker Image for Professional Edition too ?

2. When using Docker, you do not need to download a war file but only update the Docker image.
How does the OpenKM Migrations Tool work together with Docker ?

3. Is it possible to run the migration tool without user interactions ?

Re: Automatic Database Migration Process

Posted: Tue Jul 03, 2018 7:33 am
by jllort
Please add the docker question into another forum post.

Re: Automatic Database Migration Process

Posted: Wed Jul 04, 2018 10:11 am
by shaligraminfotech
hi
fantastic information provide about automatic database migration process