Custom Sql scripts

Hi Guys,

As you know, currently if you are using spring boot version of Camunda, when application is started it creates all user tables. It’s brilliant. Is there a way that we can run custom scripts after Base scripts are run.

Use case: After DB is created, we want to automatically create an admin user and other test groups avoiding manual intervention.

Thanks for your time.


Answering my own question.

If we are using spring boot application, it may be a good idea to have ApplicationReadyEvent listener and call a DataGenerator. Something like

Indeed, one can use JPA but it is far from ideal.
If a better solutions exist, i’m more than happy to hear it. (eg using the mybatis scriptrunner)


May be Liquibase & ApplicationReadyEvent with below code?

		JdbcConnection liquibaseConnection = new JdbcConnection(connection);
		Liquibase liquibase = new Liquibase("liquibase/db.changelog-master.xml", new ClassLoaderResourceAccessor(),