mirror of
https://github.com/kennethreitz-archive/www.gittip.com.git
synced 2026-06-05 23:30:19 +00:00
fa1b834f62
1 - It's "usename", not "username" :( 2 - Create gittip role, not 'vagrant' 3 - Make it a superuser
14 lines
296 B
SQL
14 lines
296 B
SQL
-- http://stackoverflow.com/questions/8092086/create-postgresql-role-user-if-it-doesnt-exist
|
|
DO
|
|
$body$
|
|
BEGIN
|
|
IF NOT EXISTS (
|
|
SELECT *
|
|
FROM pg_catalog.pg_user
|
|
WHERE usename = 'gittip') THEN
|
|
|
|
CREATE ROLE gittip LOGIN PASSWORD 'gittip' SUPERUSER;
|
|
END IF;
|
|
END
|
|
$body$
|