Rename tables in the database
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2013 10:07 AM
Hello,
Is it possible to rename the tables in the database from ACT_XXXX to BPM_XXXX, for example, without overwriting the API?
In my application "ACT_" acronym is reserved for ACTION data tables.
Thanks.
Is it possible to rename the tables in the database from ACT_XXXX to BPM_XXXX, for example, without overwriting the API?
In my application "ACT_" acronym is reserved for ACTION data tables.
Thanks.
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2013 03:28 AM
You can have table-prefixed for the tables, to overcome issues with clashing names. Renaming the whole table is not possible. So you could have an BPM_ACT_RU_EXECUTION table, but not a BPM_RU_EXECUTION table (at least, not without forking activiti
).
Prefix can be configured using property "databaseTablePrefix" on the processEngineConfiguration:
You should manually create the tables using the prefix. Look for the right files in github or in the engine jar (each DB has a set of *create*.sql files). Alter those to respect the prefix you set. From that point on, if the engine boots, the prefix will be used.

Prefix can be configured using property "databaseTablePrefix" on the processEngineConfiguration:
/**
* Allows configuring a database table prefix which is used for all runtime operations of the process engine.
* For example, if you specify a prefix named 'PRE1.', activiti will query for executions in a table named
* 'PRE1.ACT_RU_EXECUTION_'.
*
* <p />
* <strong>NOTE: the prefix is not respected by automatic database schema management. If you use
* {@link ProcessEngineConfiguration#DB_SCHEMA_UPDATE_CREATE_DROP}
* or {@link ProcessEngineConfiguration#DB_SCHEMA_UPDATE_TRUE}, activiti will create the database tables
* using the default names, regardless of the prefix configured here.</strong>
*
* @since 5.9
*/
protected String databaseTablePrefix = "";
You should manually create the tables using the prefix. Look for the right files in github or in the engine jar (each DB has a set of *create*.sql files). Alter those to respect the prefix you set. From that point on, if the engine boots, the prefix will be used.
/modules/activiti-engine/src/main/resources/org/activiti/db/create/activiti.h2.create.engine.sql
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2013 11:13 AM
Perfect!!!
I tried it and all ok. It's what I needed.
Thank you very much.
I tried it and all ok. It's what I needed.
Thank you very much.
