Skip to content

Instantly share code, notes, and snippets.

@rcanepa
Created December 16, 2015 15:11
Show Gist options
  • Save rcanepa/fb367368646ecc1577b2 to your computer and use it in GitHub Desktop.
Save rcanepa/fb367368646ecc1577b2 to your computer and use it in GitHub Desktop.
Basic setup for a dev and test database on PostgreSQL
CREATE DATABASE auth;
CREATE DATABASE auth_test;
\c auth;
CREATE EXTENSION citext;
\c auth_test;
CREATE EXTENSION citext;
CREATE ROLE auth_user LOGIN;
ALTER ROLE auth_user WITH PASSWORD 'password1';
GRANT ALL PRIVILEGES ON DATABASE auth to auth_user;
GRANT ALL PRIVILEGES ON DATABASE auth_test to auth_user;
-- About citext;
-- http://www.postgresql.org/docs/9.1/static/citext.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment