File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,14 +99,29 @@ jobs:
9999 psql -p 10563 -U dspace -d dspace -c \"
100100 DO \\\$\\\$
101101 BEGIN
102+ -- Create dspace5 role if it doesn't exist
102103 IF NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = 'dspace5') THEN
103104 CREATE ROLE dspace5;
104105 GRANT dspace5 TO dspace;
105106 ALTER ROLE dspace5 LOGIN;
106107 ALTER ROLE dspace5 INHERIT;
107108 END IF;
109+
110+ -- Create postgres role if it doesn't exist
111+ IF NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = 'postgres') THEN
112+ CREATE ROLE postgres;
113+ GRANT postgres TO dspace;
114+ ALTER ROLE postgres LOGIN;
115+ ALTER ROLE postgres INHERIT;
116+ ALTER ROLE postgres SUPERUSER;
117+ ALTER ROLE postgres CREATEDB;
118+ ALTER ROLE postgres CREATEROLE;
119+ END IF;
108120 END
109121 \\\$\\\$;
122+
123+ -- Create pgcrypto extension if it doesn't exist (required by DSpace)
124+ CREATE EXTENSION IF NOT EXISTS pgcrypto;
110125 \" &&
111126 psql -p 10563 -U dspace -d dspace -f /tmp/$FNAME &&
112127 rm /tmp/$FNAME
You can’t perform that action at this time.
0 commit comments