Provide a specefic path for CUBA generated tables

Hello guys,
I am making CUBA application with an existing MySQL database (let’s call it “mydatabase”). I have created a project and everything seems to work fine but I have noticed in MySQL workbench the additional CUBA related tables(e.g.- sys_user…) are added in “mydatabase”.
My question is there’s any way I can provide a specific path for the additional tables and dump them into another database?
I want to create a database “cuba” in MySQL workbench containing all the additional tables here instead of tables in “mydatabase”, this case would be more convenient.
Is it possible?

Thanks in advance.


Hi Sanchit,

This is possible:

  • First create a new database for your CUBA app. It will store CUBA system entities.

  • Then define an additional data store pointing to your legacy database. You can do it on the Project properties > Advanced tab in Studio.

  • When running the Generate model wizard, select your additional data store.

As a result, your application will work with two databases - one storing system CUBA entities, the other storing your appplication entities.