Invoke JMX-bean's method on database re-creation

If in our project we put some predefined entities in
.\modules\core\db\init\postgres\30.create-db.sql
then these are added into database during db creation
Then we have to manually run fts::reindexAll() from JMX console in order to make them appear in FTS.
https://doc.cuba-platform.com/fts-latest/fts.html#reindex
How to perform that operation automatically when we (re)create database during deployment?

You should invoke com.haulmont.fts.core.app.FtsManagerAPI#reindexAll on the server startup, but only if some flag stored in the database is false. Create a listener for the AppContextStartedEvent and use an application property, stored in the database, as a flag indicating that the process has been run already. You can change the value of the flag programmatically if you create getter and setter in the configuration interface defining the property.