cancel
Showing results for 
Search instead for 
Did you mean: 

how to run sql script when nuxeo instance starts

geekonspace
Star Contributor
Star Contributor

Hi, we want to run sql script when our nuxeo instance starts. This script should create tables in database if this not exists. We do not want to use schemas contributions because we do not want to manage those rows tables as documents types.

We want to do something equals to nxp_logs because we will use those tables for stats

1 ACCEPTED ANSWER

Damien_Metzler
Star Contributor
Star Contributor

Hello,

You can configure VCS to do so. The documentation is here :

http://doc.nuxeo.com/display/ADMINDOC/VCS+Configuration

You have to specify a script in the sqlInitFile tag (See database creation option). This scripts holds some commands to pass to the backend given some condictions. As stated in the doc, you'll find some samples here https://github.com/nuxeo/nuxeo-core/tree/master/nuxeo-core-storage-sql/nuxeo-core-storage-sql/src/ma...

View answer in original post

1 REPLY 1

Damien_Metzler
Star Contributor
Star Contributor

Hello,

You can configure VCS to do so. The documentation is here :

http://doc.nuxeo.com/display/ADMINDOC/VCS+Configuration

You have to specify a script in the sqlInitFile tag (See database creation option). This scripts holds some commands to pass to the backend given some condictions. As stated in the doc, you'll find some samples here https://github.com/nuxeo/nuxeo-core/tree/master/nuxeo-core-storage-sql/nuxeo-core-storage-sql/src/ma...