Create/Update database intermittently does not call scripts for application components

The scenario is the following:

  1. Created a simple project with global and core modules only, with 3 entities (the same from the sample-booking project)
  2. Generated DB scripts for HSQL
  3. Created app component descriptor and installed locally

Then I created another empty project to host the previous component:

  1. Added the component using the Project Properties dialog
  2. Run the Create Database task

The scripts for the component were not executed:

17:37:11: Executing task 'createDb'...

> Task :booking-core:assembleDbScripts

> Task :booking-core:createDb
Using database URL: jdbc:hsqldb:hsql://localhost:9010/booking, user: sa
Executing SQL: drop schema public cascade;
Using database URL: jdbc:hsqldb:hsql://localhost:9010/booking, user: sa
Executing SQL script: /Users/paolof/Developer/cuba/7/booking/modules/core/build/db/10-cuba/init/hsql/create-db.sql

BUILD SUCCESSFUL in 0s
2 actionable tasks: 2 executed
17:37:12: Task execution finished 'createDb'.

Then I tried deleting the published component in my m2 directory, rebuild and reinstall it, close and restart CUBA Studio, but with the same outcome.
Then I deleted the IDE caches, cleaned, undeployed, restarted the IDE again, compiled the project, and this time the Create Database worked as expected:

17:37:11: Executing task 'createDb'...

> Task :booking-core:assembleDbScripts

> Task :booking-core:createDb
Using database URL: jdbc:hsqldb:hsql://localhost:9010/booking, user: sa
Executing SQL: drop schema public cascade;
Using database URL: jdbc:hsqldb:hsql://localhost:9010/booking, user: sa
Executing SQL script: /Users/paolof/Developer/cuba/7/booking/modules/core/build/db/10-cuba/init/hsql/create-db.sql
Executing SQL script: /Users/paolof/Developer/cuba/7/booking/modules/core/build/db/50-booking-common/init/hsql/10.create-db.sql
Executing SQL script: /Users/paolof/Developer/cuba/7/booking/modules/core/build/db/50-booking-common/init/hsql/20.create-db.sql
Executing SQL script: /Users/paolof/Developer/cuba/7/booking/modules/core/build/db/50-booking-common/init/hsql/30.create-db.sql

BUILD SUCCESSFUL in 0s
2 actionable tasks: 2 executed
17:37:12: Task execution finished 'createDb'.

I’ve never had this kind of quirks before when using the standalone Studio, and I hope this won’t be the norm going forward…

Hello! We recommend using “Install App Component” option from CUBA - Advanced menu, in case of using it the problem doesn’t occur.