Check database existence earlier - Mendix Forum

Check database existence earlier


Would it be possible to perform the database check (if it exists) as one of the first deployment steps?

Right now, when checking out a project from version control and running it, the system performs a couple of steps:
Synchronize with the file system
Check prerequisites
Prepare deployment
Build deployment structure
Save model to deployment directory

After which the application is started. Depending on the size of your project, this may take some time. However because the database settings are reset to the default, when checking out a new copy, after startup a message (Database ‘database name’ does not exist yet. Create it?) will be shown. Also the database connection is set to default, when the modeler hasn't been closed properly, when on startup a message is shown the project is already opened by an other instance of the modeler.  

This is a bit annoying as it feels the modeler could have know this before doing all the other effort of deploying the app. Now you have to say ‘No’, change the configuration and perform all deployment steps again. Which feels a bit like a waste of time. 

5 answers

And have a “test database connection” button on the Settings>Configuration window to check if the correct properties and credentials are set without the need to compile first.


@Tim, the same happens to me all too often. But instead of coffee, I'm having tea. :)


I had the same idea. Actually added it to this forum  an hour ago, described in my own words:

When starting the project from the modeler by clicking   it is busy for a while (longer than my attention span, I am off getting coffee) and if the domain model has changed then it asks me:

“Synchronize Database?"

So I come back with hot coffee expecting the app to be running, but no, I first have to answer this question.

Why wait asking me this? Instead directly after clicking , check if the domain model has changed by checking the Change-list and ask this question directly.

And now I see this one, so I removed mine and just upvoted this idea.


I suppose you are right. As I assume Mendix is using something like Liquibase to apply changes (in the domain model) to the database, which only becomes available after startup of the application. 


I feel this should be solved by forcing you to choose the configuration to use when first starting the application.