Database tables drop automatically

We developed a project in Java EE using the camunda glassfish distribution and we are using Oracle DB. We made the following changes in the following files:

  1. In bpm-platform.xml we made this change:
    <property name="databaseSchemaUpdate">false</property>

  2. At the first deployment we create the table using the following in our persistence.xml:
    <property name="toplink.ddl-generation" value="drop-and-create-tables" />
    <property name="hibernate.hbm2ddl.auto" value="create-drop" />
    Then we changed the properties as per the following after the tables were created:
    <property name="toplink.ddl-generation" value="none" />
    <property name="hibernate.hbm2ddl.auto" value="update" />

  3. We also made change in our processes.xml as per followed:
    <property name="isDeleteUponUndeploy">false</property>

Every time we deploy our project with the new war file and the modified properties, our tables get dropped automatically. Please provide a good solution to the problem, so that the database tables stay as it is!

Hi @saimulhq,

Which tables are dropped when you deploy your project? The process engine tables?

Cheers,
Roman

Hi @roman.smirnov,
The process engine tables remain as it is but all the custom tables that we made are dropped automatically.

Regards,
Saimul

Hi Saimul,

I don’t know why you have two JPA Persistence providers configured in your persistence.xml, but your problem is not related to Camunda. What JPA provider are you using in your deployment? Glassfish bundled one or included in your deployment? Check which JPA provider you are using and declare the corresponding properties to create the tables. Right now, you tell Hibernate to drop the tables upon undeployment in your first deployment, but do the opposite for Toplink.

Regaring the engine tables, they are created by the engine through the usage of the [quote=“saimulhq, post:1, topic:355”]
<property name=“databaseSchemaUpdate”>false</property>
[/quote] property. The engine won’t fiddle with your custom tables.

Cheers,
Christian