hello, i have a problem with activiti-rest, when i configure my database postgresql in db.proprietes, the creation of tables is done automatically in the public shemas, i want to change shema how i do to give it my own shema

cancel
Showing results for 
Search instead for 
Did you mean: 
mobarkiyasmine
Active Member

hello, i have a problem with activiti-rest, when i configure my database postgresql in db.proprietes, the creation of tables is done automatically in the public shemas, i want to change shema how i do to give it my own shema

hello, i have a problem with activiti-rest, when i configure  my database postgresql in db.proprietes, the creation of tables is done automatically in the public shemas, i want to change shema how i do to give it my own shema

3 Replies
alxgomz
Alfresco Employee

Re: hello, i have a problem with activiti-rest, when i configure my database postgresql in db.proprietes, the creation of tables is done automatically in the public shemas, i want to change shema how i do to give it my own shema

Hi Yasmine,

If you're using postgreSQL JDBC driver 9.4 or above, you can use the jdbc url param "currentSchema"

datasource.url=jdbcSmiley Tongueostgresql://localhost:5432/activitiapp?currentSchema=someotherschema

if using previous versions I have read that you can use the "search-path" param instead but it seems undocumented.

mobarkiyasmine
Active Member

Re: hello, i have a problem with activiti-rest, when i configure my database postgresql in db.proprietes, the creation of tables is done automatically in the public shemas, i want to change shema how i do to give it my own shema

thank you i have this configuration how can i modifie it 

db=postgres
jdbc.driver=org.postgresql.Driver
jdbc.url=jdbcSmiley Tongueostgresql://localhost:5432/activiti
jdbc.username=postgres
jdbc.password=postgres

alxgomz
Alfresco Employee

Re: hello, i have a problem with activiti-rest, when i configure my database postgresql in db.proprietes, the creation of tables is done automatically in the public shemas, i want to change shema how i do to give it my own shema

The normal activiti property for activiti should be datasource.url...not sure why you use someting different (I guess you're integrating activiti in another project...?)

Anyway... try to change:

jdbc.url=jdbcSmiley Tongueostgresql://localhost:5432/activiti

to:

jdbc.url=jdbcSmiley Tongueostgresql://localhost:5432/activiti?currentSchema=someotherschema

As stated before "currentSchema" works only for 9.4 postgres jdbc driver and above. MAke sure you have the right version.