Difference between revisions of "AppSuite:CustomDBMigrationBundle"

(Blanked the page)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div class="title">How to write custom bundles to execute database migration statements.</div>
 
  
'''Summary''': With release 7.6.1 it is possible to change the database schema based on usage of the open source tool Liquibase. Currently only updating the configdb with the new mechanism is desired. This article gives a short introduction based on an existing sample bundle how to write custom database migration bundles and how to attach your custom statements to those given by Open-Xchange.
 
 
Please have a look at liquibase, its features and documentation before writing custom bundles: http://www.liquibase.org/documentation/ . Current available version of liquibase within the Open-Xchange server is 3.0.7.
 
 
__TOC__
 
 
== Prerequisite ==
 
This article is based on an existing sample bundle located in the public git repository backend-samples. Clone the repository by executing
 
 
<code><pre>
 
git clone https://git.open-xchange.com/git/examples/backend-samples
 
</pre></code>
 
 
The required bundle is named 'com.openexchange.sample.database.migration'.
 
 
== Current restrictions ==
 
Database migrations can only be applied to the configdb!
 
 
== Bundle dependencies ==
 
To execute custom database migration for the configdb you have to track the service com.openexchange.database.migration.DBMigrationExecutorService (default provided within bundle com.openexchange.database.migration).
 
 
If you would like to have the Open-Xchange database migrations executed before your custom statements are used you even have to track the service com.openexchange.database.migration.ox.DBMigrationOXExcecutorService which is provided within the bundle com.openexchange.database.migration.ox
 
 
Usage of both is shown within the sample bundle.
 
 
== Using Liquibase ==
 
 
=== Database lock ===
 
 
=== Preconditions ===
 
 
=== Custom Java Classes ===
 
 
== Command line tools ==
 
 
== Important hints ==
 
 
[[Category: OX7]]
 
[[Category: AppSuite]]
 
[[Category: Administrator]]
 
[[Category: Database]]
 

Latest revision as of 16:58, 28 August 2014