Skip to main content
summaryrefslogtreecommitdiffstats
blob: 12cf11f8a016e0686203161d9d143297b964bdc9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
--
-- Jan Krueger, April 2015
-- Scripts for setting up databases:
--    - login-roles
--    - databases
--    - schemas
--

-- Liferay Portal Database
-- Connect as postgres (master) user
CREATE ROLE lportalopenk LOGIN PASSWORD 'lportalopenk' VALID UNTIL 'infinity'
    NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
CREATE DATABASE openk
  WITH ENCODING='UTF8'
       OWNER=postgres
       TABLESPACE = pg_default
       CONNECTION LIMIT=-1;   
-- Before executing the next statement connect as lportalopenk!
CREATE SCHEMA lportalopenk AUTHORIZATION lportalopenk;

-- CacheDB Database
-- Connect as postgres (master) user
CREATE ROLE cachedb LOGIN PASSWORD 'cachedb' VALID UNTIL 'infinity'
    NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
CREATE DATABASE cachedb
  WITH ENCODING='UTF8'
       OWNER=cachedb
       TABLESPACE = pg_default
       CONNECTION LIMIT=-1;   
-- Before executing the next statement connect as cachedb!
CREATE SCHEMA cachedb AUTHORIZATION cachedb;

-- AppDB Database
-- Connect as postgres (master) user
CREATE ROLE eisman LOGIN PASSWORD 'eisman' VALID UNTIL 'infinity'
    NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
--CREATE ROLE netstate LOGIN PASSWORD 'netstate' VALID UNTIL 'infinity'
--    NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
CREATE DATABASE appdb
  WITH ENCODING='UTF8'
       OWNER=postgres
       TABLESPACE = pg_default
       CONNECTION LIMIT=-1;   
-- Before executing the next statement connect as eisman!
CREATE SCHEMA eisman AUTHORIZATION eisman;
-- Before executing the next statement connect as netstate!
--CREATE SCHEMA netstate AUTHORIZATION netstate;

Back to the top