]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-6349: Replaced now-obsolete comments in Nuxeo databases initialization script...
authorAron Roberts <aron@socrates.berkeley.edu>
Fri, 21 Mar 2014 19:55:57 +0000 (12:55 -0700)
committerAron Roberts <aron@socrates.berkeley.edu>
Fri, 21 Mar 2014 19:55:57 +0000 (12:55 -0700)
src/main/resources/db/postgresql/init_nuxeo_db.sql

index 5bb820ff9f1853a778fa94e8775550e54b006f61..84e9e0a5700d629407791c1aade4b56747e899d7 100644 (file)
@@ -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: