postgresql shema Jahia 7.3

Use a custom PostgreSQL schema

Question

Jahia has to be installed in a different schema than the default one public

Cause

IT department does not want to use the default schema public

Solution

In PostgreSQL

CREATE DATABASE DATABASE_NAME;
CREATE USER USER_NAME WITH PASSWORD 'PASSWORD';
\connect USER_NAME
CREATE SCHEMA CUSTOM_SCHEMA_NAME;
GRANT ALL PRIVILEGES ON DATABASE DATABASE_NAME TO USER_NAME;
GRANT ALL PRIVILEGES ON SCHEMA CUSTOM_SCHEMA_NAME TO USER_NAME;
ALTER USER probtp29 SET search_path = public, CUSTOM_SCHEMA_NAME;


At the install of Jahia, specify the following JDBC

url: jdbc:postgresql://PSQL_SERVER_NAME:PORT/DATABASE_NAME?currentSchema=CUSTOM_SCHEMA_NAME