Skip to content

Commit

Permalink
added password to sql setup script
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Oct 1, 2012
1 parent 8fa0e12 commit d01d414
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -16,6 +16,7 @@ To run the script, execute:
\set datastoredb datastore
\set ckanuser ckanuser
\set rouser readonlyuser
\set ropwd 'pass'

-- create the datastore database
create database :datastoredb;
Expand All @@ -38,7 +39,7 @@ GRANT CREATE ON SCHEMA public TO :ckanuser;
GRANT USAGE ON SCHEMA public TO :ckanuser;

-- create new read only user
CREATE USER :rouser NOSUPERUSER NOCREATEDB NOCREATEROLE LOGIN;
CREATE USER :rouser WITH PASSWORD :ropwd NOSUPERUSER NOCREATEDB NOCREATEROLE LOGIN;

-- take connect permissions from main db
REVOKE CONNECT ON DATABASE :maindb FROM :rouser;
Expand Down

0 comments on commit d01d414

Please sign in to comment.