postgresql - specify a database schema for activiti-5.12.1 tables -
i going use activiti-5.12.1, in project.
here activiti.cfg.xml file:
<?xml version='1.0' encoding='utf-8'?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean id="processengineconfiguration" class="org.activiti.engine.impl.cfg.standaloneprocessengineconfiguration" > <property name="databasetype" value="postgres" /> <property name="jdbcurl" value="jdbc:postgresql://project:5432/myproject" /> <property name="jdbcdriver" value="org.postgresql.driver" /> <property name="jdbcusername" value="me" /> <property name="jdbcpassword" value="you" /> <property name="databaseschemaupdate" value="false" /> <property name="jobexecutoractivate" value="false" /> <property name="history" value="full" /> <property name="customprevariabletypes"> <list> <ref bean="activitiscriptnodetype" /> <ref bean="activitiscriptnodelisttype" /> </list> </property> <property name="mailserverhost" value="mail.my-corp.com" /> <property name="mailserverport" value="5025" /> </bean> </beans>
i want create activiti database on own, using scripts available in activiti-engine-5.12.1.jar.
default, tables created in public schema, want them in schema myschema example.
questioin how can manage this, besides, how can specify in activiti.cfg.xml, inform activiti engine api activiti tables in myschema?
i using mysql
database activiti
, have got configuration creat own schema name :
<property name="databasetype" value="mysql" /> <property name="jdbcurl" value="jdbc:mysql://localhost:3306/activiti" /> <property name="jdbcdriver" value="com.mysql.jdbc.driver" /> <property name="jdbcusername" value="root" /> <property name="jdbcpassword" value="root" />
so using postgresql
, not quite sure whether following code work or not :
<?xml version='1.0' encoding='utf-8'?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean id="processengineconfiguration" class="org.activiti.engine.impl.cfg.standaloneprocessengineconfiguration" > <property name="databasetype" value="postgres" /> <property name="jdbcurl" value="jdbc:postgresql://project:5432/myproject/activiti" /> <property name="jdbcdriver" value="org.postgresql.driver" /> <property name="jdbcusername" value="me" /> <property name="jdbcpassword" value="you" /> <property name="databaseschemaupdate" value="false" /> <property name="jobexecutoractivate" value="false" /> <property name="history" value="full" /> <property name="customprevariabletypes"> <list> <ref bean="activitiscriptnodetype" /> <ref bean="activitiscriptnodelisttype" /> </list> </property> <property name="mailserverhost" value="mail.my-corp.com" /> <property name="mailserverport" value="5025" /> </bean>
before deploying `activiti new changes, mke sure database has schema created.
Comments
Post a Comment