Created
November 27, 2016 01:31
-
-
Save garyharan/3e67a810d5a42f030abe2d02d43d5df5 to your computer and use it in GitHub Desktop.
How to setup postgresql properly for phoenix defaults
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# where APP_NAME is app name. | |
createuser -P postgres | |
createdb APP_NAME_dev | |
createdb APP_NAME_test |
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
Of course the order of files is wrong. grants.sql is run second.