Skip to content
CUBA component for defining & executing custom DB updates through the UI
Groovy Java Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Download license Build Status

CUBA Platform Component - DB-Update Wizard

This application component can be used for creating one-off custom DB updates that should be executed by the administrator through the UI.

For normal / small-delta changes of the DB, the default CUBA DB-update scripts mechanisms should be used. But sometimes there are migrations from an existing database schema from another framework e.g, which are hard to do through the default mechanisms. This is where this application components comes into play.


  1. Add the following maven repository to the build.gradle of your CUBA application:

    buildscript {

     repositories {
         // ...
         maven {
             url  ""
     // ...


  2. Select a version of the add-on which is compatible with the platform version used in your project:

Platform Version Add-on Version
6.6.x 0.2.x
6.5.x 0.1.x

The latest version is: Download

Add custom application component to your project:

  • Artifact group: de.diedavids.cuba.dbupdatewizard
  • Artifact name: db-update-wizard-global
  • Version: add-on version


To create a custom DB-Update in your code, where you want to connect to another Database or doing some other crazy stuff, that is not really possible through the normal Update scripts of CUBA, you can create a class in your application that will extend DefaultDbUpdateWizardService like this:

class MyCustomDbUpdateWizardServiceBean extends DefaultDbUpdateWizardServiceBean {

    public boolean isUpdateAvaliable() {
        return true;

    public String getDbUpdateWizardStartMessage() {
        return "my start message";

    public Collection<Message> validatePreconditions() {
        // do pre-condition checks and return a Collection of Messages that will be displayed in the UI
        // If it contains a Message with MessageType.ERROR, the UI will not allow the user to proceed
        return null;

    public Collection<Message> executeUpdate() {
        // do the actual update and return a Collection of Messages that will be displayed in the UI
        return null;

In order to make the db wizard aware of your bean, you have to register it in the spring.xml of the core module of your application like this:

 <bean id="ddcduw_DbUpdateWizardService" class="" />

DB Update Wizard

The UI that the User can use to run the custom DB Update is placed under "Administration" > "DB-Update Wizard".

You can’t perform that action at this time.