Database update doesn't work in Studio

Hi
When I modify or create any new Entity from the Studio and Hit the “Update Database” option, I get the message that the Database update has been completed. However, it is not the case. When I run the application, after 5-7 minutes (I have a large project) I get the message that the database script needs to be updated that starts the DB Script generator and runs again for several minutes.

If not mistaken, DB Script generation shouldn’t be necessary every time as Update database should be enough to update and run the application. Thanks for sharing the thoughts.

Hi Mortoza,

First of all, the “Update Database” command doesn’t generate new update scripts, it only executes already existing scripts. After changing your entities, first execute “Generate Database Scripts”, review what is created, and click “Update Database” right in the “Database Scripts” window, or do it afterwards.

When Studio starts the app server, it first checks the compatibility of the database schema and data model. And it takes significant time depending on how large your data model is and how fast is the database. In the upcoming Studio 10 we improved the performance of this process for about 30%. In the future Studio 11, you will be able to turn off the check on server start if it takes too long, see issue.

Thank you Konstantin for the update on the improvements. It is indeed my application is fairly large, > 800 Entity, about 200 MB of war file. Currently it takes quite sometime to generate DB script & assembly. I hope upcoming improvements will help a lot.

@knstvk
Is it feasible to have option to generate only the incremental changes/additions instead of the whole dB scripts generation by default?

No, the whole database scheme is checked against the whole model each time, because Studio does not track what you do with entities. It’s just impossible, as the model could be changed by different developers and changes could be obtained from the VCS.

Ok, clear.
Eagerly awaiting for the version 10 of the studio.