I am trying to reconcile a difficulty in having Flowable play well with Flyway (for scripted database creation) using Spring Boot. The primary issue is that Flyway is role based, so the tables that it generates are owned by the role that I provide it. But tables in Flowable are owned by the user (provided by spring.datasource.username).
This works fine the first time I run my application. The Flyway scripts create all my tables, then Flowable creates all it’s tables. But Flyway manages it’s database scripts with a history table, and does not like the fact that the Flowable tables share the same schema with a different owner and things fall apart from there.
I can manually go in a change the owner of each table to be the same Role i am using with Flyway and that works, but that is a pain. So…
Is there a way to have Flowable create my tables with ownership going to a provided role, not the user?
…I am trying to retain the use of the same datasource for Flowable and Flyway