summaryrefslogtreecommitdiffstats
path: root/rulemgt-standalone/src/main/assembly/dbscripts
diff options
context:
space:
mode:
authorGuangrong Fu <fu.guangrong@zte.com.cn>2017-11-04 11:40:13 +0800
committerGuangrong Fu <fu.guangrong@zte.com.cn>2017-11-04 12:02:23 +0800
commitb77188b0eb09f50f5c6470635da84d4c057c012c (patch)
treeef862fe822654ba5590b9935ee0524af0570c3e1 /rulemgt-standalone/src/main/assembly/dbscripts
parent3893b89844f0e76d1a80c578216c4320fac65ed9 (diff)
Change the DB Script to Accommodate DCAE
Change-Id: If47a0ef564cf252c461e60d4aff4021ebc24d25a Issue-ID: HOLMES-81 Signed-off-by: Guangrong Fu <fu.guangrong@zte.com.cn>
Diffstat (limited to 'rulemgt-standalone/src/main/assembly/dbscripts')
-rw-r--r--rulemgt-standalone/src/main/assembly/dbscripts/postgresql/onap-holmes_rulemgt-createobj.sql17
1 files changed, 7 insertions, 10 deletions
diff --git a/rulemgt-standalone/src/main/assembly/dbscripts/postgresql/onap-holmes_rulemgt-createobj.sql b/rulemgt-standalone/src/main/assembly/dbscripts/postgresql/onap-holmes_rulemgt-createobj.sql
index cbd3c59..87dd3a7 100644
--- a/rulemgt-standalone/src/main/assembly/dbscripts/postgresql/onap-holmes_rulemgt-createobj.sql
+++ b/rulemgt-standalone/src/main/assembly/dbscripts/postgresql/onap-holmes_rulemgt-createobj.sql
@@ -13,22 +13,19 @@
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
-/******************drop old database and user***************************/
-\c postgres;
-
-DROP DATABASE IF EXISTS holmes;
-
-DROP ROLE IF EXISTS holmes;
+\c postgres
/******************CREATE NEW DATABASE AND USER***************************/
-CREATE DATABASE holmes;
+CREATE DATABASE DBNAME;
-CREATE ROLE holmes with PASSWORD 'holmespwd' LOGIN;
+CREATE ROLE DBUSER with PASSWORD 'DBPWD' LOGIN;
\encoding UTF8;
/******************DELETE OLD TABLE AND CREATE NEW***************************/
-\c holmes;
+\c DBNAME;
+
+DROP TABLE IF EXISTS APLUS_RULE;
CREATE TABLE APLUS_RULE (
RID VARCHAR(30) NOT NULL,
@@ -58,5 +55,5 @@ CREATE INDEX IDX_APLUS_RULE_TEMPLATEID ON APLUS_RULE (TEMPLATEID);
CREATE INDEX IDX_APLUS_RULE_ENGINEID ON APLUS_RULE (ENGINEID);
CREATE INDEX IDX_APLUS_RULE_ENGINETYPE ON APLUS_RULE (ENGINETYPE);
-GRANT ALL PRIVILEGES ON APLUS_RULE TO holmes;
+GRANT ALL PRIVILEGES ON APLUS_RULE TO DBUSER;