Files
btubbs fa1b834f62 Fix typos in add_gittip_user.sql
1 - It's "usename", not "username" :(
2 - Create gittip role, not 'vagrant'
3 - Make it a superuser
2013-03-18 09:13:13 -07:00

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$