summaryrefslogtreecommitdiff
path: root/util/sql/superuser_init.sql
blob: 1a2602cd8480d6eb330d64c56b855e5f31bf9e7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-- This script should be run before all other scripts and as a PostgreSQL
-- superuser. It will create the VNDB database and required users.
-- All other SQL scripts should be run by the 'vndb' user.

-- In order to "activate" a user, i.e. to allow login, you need to manually run
-- the following for each user you want to activate:
--   ALTER ROLE rolename LOGIN UNENCRYPTED PASSWORD 'password';

CREATE ROLE vndb;
CREATE DATABASE vndb OWNER vndb;

-- The website
CREATE ROLE vndb_site;
-- Multi
CREATE ROLE vndb_multi;