# Flowable engine how to use different DB user for DML & separate for DDL at startup

**URL:** <https://forum.flowable.org/t/flowable-engine-how-to-use-different-db-user-for-dml-separate-for-ddl-at-startup/11255>\
**Category:** Uncategorized\
**Created:** [February 8, 2024, 12:11pm UTC](https://forum.flowable.org/t/flowable-engine-how-to-use-different-db-user-for-dml-separate-for-ddl-at-startup/11255 "2024-02-08T12:11:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tanwar](https://avatars.discourse-cdn.com/v4/letter/t/bc8723/32.png) [@Tanwar](https://forum.flowable.org/u/Tanwar)\
**Post date:** [February 8, 2024, 12:11pm UTC](https://forum.flowable.org/t/flowable-engine-how-to-use-different-db-user-for-dml-separate-for-ddl-at-startup/11255/1 "2024-02-08T12:11:17Z")

</div>

Hi,

I’m using flowable-spring-boot-starter-process and everything is fine with it. However, there is an issue which I’m trying to sort out as below:

When Springboot app with flowable engine boots up it tries to create the tables (DDL operation).  
(I know it uses liquibase internally.)  
If the user doesn’t have DDL grant then the application boot fails.  
Is there a way we can use multiple DB users i.e at boot use the datasource with the user having DDL grant. Post boot, switch to the datasource with just DML grant.

or, can we move the liquibase stuff out in a separate application which creates the schema.  
The app then should not look to create the schema if we do so.

Please do suggest if any of it is possible.

@joram  
@j3d @duke1995 - Looks like you had similar question. Have you found any solutions around it?

Kind Regards  
Gaurav Tanwar

---

<div class="post-metadata">

**Author:** ![prathamesh](https://avatars.discourse-cdn.com/v4/letter/p/c0e974/32.png) [@prathamesh](https://forum.flowable.org/u/prathamesh)\
**Post date:** [February 11, 2024, 1:03pm UTC](https://forum.flowable.org/t/flowable-engine-how-to-use-different-db-user-for-dml-separate-for-ddl-at-startup/11255/2 "2024-02-11T13:03:27Z")

</div>

Best approach in given scenario is to create ddl separately, either by another app (preferred) or manually, and then turning on DDL schema creation in main app, by property -  
`flowable.database-schema-update=ignore`

More details - [Flowable Database Schema | Flowable Enterprise Documentation](https://documentation.flowable.com/latest/develop/dbs/overview#database-scripts)

---

<div class="post-metadata">

**Author:** ![Tanwar](https://avatars.discourse-cdn.com/v4/letter/t/bc8723/32.png) [@Tanwar](https://forum.flowable.org/u/Tanwar)\
**Post date:** [February 12, 2024, 1:01pm UTC](https://forum.flowable.org/t/flowable-engine-how-to-use-different-db-user-for-dml-separate-for-ddl-at-startup/11255/3 "2024-02-12T13:01:23Z")

</div>

@prathamesh  
That’s awesome.

BTW - I plan to use liquibase in a separate application to create the schema.  
Have you got the liquibase yml’s for it otherwsier I’ll go the hard way & create them from the scripts 🙂

Thanks

---

<div class="post-metadata">

**Author:** ![prathamesh](https://avatars.discourse-cdn.com/v4/letter/p/c0e974/32.png) [@prathamesh](https://forum.flowable.org/u/prathamesh)\
**Post date:** [February 19, 2024, 1:54pm UTC](https://forum.flowable.org/t/flowable-engine-how-to-use-different-db-user-for-dml-separate-for-ddl-at-startup/11255/4 "2024-02-19T13:54:06Z")

</div>

The documentation page I provided earlier contains the necessary DDL scripts

---

<div class="post-metadata">

**Author:** ![Tanwar](https://avatars.discourse-cdn.com/v4/letter/t/bc8723/32.png) [@Tanwar](https://forum.flowable.org/u/Tanwar)\
**Post date:** [February 21, 2024, 12:44pm UTC](https://forum.flowable.org/t/flowable-engine-how-to-use-different-db-user-for-dml-separate-for-ddl-at-startup/11255/5 "2024-02-21T12:44:27Z")

</div>

It seems the tables are starting with FLW in the scripts. They are not quite for open source flowable engine rather they are for enterprise version.

Do you have scripts for open source flowable too?

---

<div class="post-metadata">

**Author:** ![prathamesh](https://avatars.discourse-cdn.com/v4/letter/p/c0e974/32.png) [@prathamesh](https://forum.flowable.org/u/prathamesh)\
**Post date:** [February 23, 2024, 9:23am UTC](https://forum.flowable.org/t/flowable-engine-how-to-use-different-db-user-for-dml-separate-for-ddl-at-startup/11255/6 "2024-02-23T09:23:57Z")

</div>

Just use flowable.engine.xxx.all.create.sql

---

<div class="post-metadata">

**Author:** ![Tanwar](https://avatars.discourse-cdn.com/v4/letter/t/bc8723/32.png) [@Tanwar](https://forum.flowable.org/u/Tanwar)\
**Post date:** [February 23, 2024, 10:45am UTC](https://forum.flowable.org/t/flowable-engine-how-to-use-different-db-user-for-dml-separate-for-ddl-at-startup/11255/7 "2024-02-23T10:45:17Z")

</div>

One last question (promise) 🙂  
I see the DB scripts version is 3.15.0 and the flowable-engine is versioned as 7.0.0 and the latest is 7.0.1  
If I’m on 7.0.0 and want my DB schema to update to the version which 7.0.1 needs then how do I go about it.  
Is there a like to like version which I can use to upgrade from a version 1 to version 2.

I see there are upgrade scripts in DB scripts but it is difficult to gauge as to what engine version they are for.

---

<div class="post-metadata">

**Author:** ![filiphr](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/filiphr/32/315_2.png) [@filiphr](https://forum.flowable.org/u/filiphr)\
**Post date:** [June 11, 2024, 2:53pm UTC](https://forum.flowable.org/t/flowable-engine-how-to-use-different-db-user-for-dml-separate-for-ddl-at-startup/11255/8 "2024-06-11T14:53:28Z")

</div>

Hey @Tanwar,

We are using a mix of Liquibase and manual SQL. With the manual SQL, there are appropriate upgrade files for the different engines.

Cheers,  
Filip
