Skip to content

Instantly share code, notes, and snippets.

@garyharan
Created November 27, 2016 01:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garyharan/3e67a810d5a42f030abe2d02d43d5df5 to your computer and use it in GitHub Desktop.
Save garyharan/3e67a810d5a42f030abe2d02d43d5df5 to your computer and use it in GitHub Desktop.
How to setup postgresql properly for phoenix defaults
# run psql command to get to this
# Replace APP_NAME with application name
grant all privileges on database APP_NAME_dev to postgres;
grant all privileges on database APP_NAME_test to postgres;
# where APP_NAME is app name.
createuser -P postgres
createdb APP_NAME_dev
createdb APP_NAME_test
@garyharan
Copy link
Author

Of course the order of files is wrong. grants.sql is run second.

@garyharan
Copy link
Author

So apparently when I tried to run tests it required a bit more capabilities.

I ran psql with my superuser and then ran ALTER ROLE postgres CREATEDB;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment