From bb8161378bc805f979006ffb4067a7a90ba76aad Mon Sep 17 00:00:00 2001 From: Aron Roberts Date: Fri, 21 Mar 2014 12:55:57 -0700 Subject: [PATCH] CSPACE-6349: Replaced now-obsolete comments in Nuxeo databases initialization script with new comments. --- .../resources/db/postgresql/init_nuxeo_db.sql | 38 ++++++++----------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/src/main/resources/db/postgresql/init_nuxeo_db.sql b/src/main/resources/db/postgresql/init_nuxeo_db.sql index 5bb820ff9..84e9e0a57 100644 --- a/src/main/resources/db/postgresql/init_nuxeo_db.sql +++ b/src/main/resources/db/postgresql/init_nuxeo_db.sql @@ -1,26 +1,20 @@ --- drop all the objects before dropping roles -DROP database IF EXISTS @DB_NUXEO_NAME@; -DROP database IF EXISTS lifesci_domain; +-- init_nuxeo_db.sql -DROP USER IF EXISTS @DB_NUXEO_USER@; -DROP USER IF EXISTS @DB_READER_USER@; +-- This file holds SQL statements which can be run to initialize +-- the Nuxeo-managed databases. A copy of this file is deployed to the +-- CollectionSpace server folder during a build of the Services layer. --- All the rest of what is commented out below is now handled at startup --- by the services web-app +-- Beginning with CollectionSpace version 4.1, the contents of the deployed +-- copy of this file are no longer static. Rather, that file's contents are +-- now written during each CollectionSpace system startup, via Services layer code. --- CREATE ROLE @DB_NUXEO_USER@ WITH PASSWORD '@DB_NUXEO_PASSWORD@' LOGIN; --- CREATE ROLE reader WITH PASSWORD 'read' LOGIN; +-- You can manually invoke the initialization commands in that file +-- by entering the command "ant create_nuxeo_db" from the top of the +-- Services layer source code tree. (Please note that doing so will DELETE +-- the Nuxeo-managed databases and their associated user roles, and +-- will irrevocably DESTROY your data contained in those databases.) --- --- recreate nuxeo database --- --- CREATE DATABASE nuxeo ENCODING 'UTF8' OWNER @DB_NUXEO_USER@; - --- --- Grant privileges to read-only user on Nuxeo, for reporting. --- --- GRANT CONNECT ON DATABASE nuxeo TO reader; - --- GRANT SELECT ON ALL TABLES IN SCHEMA public TO reader; --- This must be run by hand, after the system has already started up, --- so that it gives access to all the tables created on init. \ No newline at end of file +-- Any additional initialization statements not already written to that +-- file during startup can be added here, following this comment. You'll +-- need to deploy this file to the CollectionSpace server folder, to have +-- those additional statements take effect: -- 2.47.3