Skip to content

Instantly share code, notes, and snippets.

@thogg4
Created November 7, 2012 23:41
Show Gist options
  • Select an option

  • Save thogg4/4035402 to your computer and use it in GitHub Desktop.

Select an option

Save thogg4/4035402 to your computer and use it in GitHub Desktop.
postgres setup
create role myapp with createdb login password 'myapp'; // 'login' is optional if you plan to use psql
// with newer versions of Rails, 'rake db:create:all' will create all the databases listed in config/database.yml
select * from pg_user; // verify user created
select * from pg_shadow; // sysid listed here
create database myapp_development owner myapp;
create database myapp_test owner myapp;
create database myapp_production owner myapp;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment