buffalo: Create / drop database not working
Hi there,
Thanks for your work, at first đ
I ran into problems just executing the following command:
$ buffalo create db -a
OR
$ buffalo db drop -a
I have the following database.yml:
development:
dialect: postgres
database: myAppdb
user: user
password: password
host: 127.0.0.1
pool: 5
test:
url: {{envOr "TEST_DATABASE_URL" "postgres://user:password@127.0.0.1:5432/myApp_test?sslmode=disable"}}
production:
url: {{envOr "DATABASE_URL" "postgres://user:password@127.0.0.1:5432/myApp_production?sslmode=disable"}}
I get:
$ buffalo db drop -a
v3.41.3
couldn't drop database myApp_test: error dropping PostgreSQL database myApp_test: pq: authentification par mot de passe échouée pour l'utilisateur « user »
couldn't drop database myApp_production: error dropping PostgreSQL database myApp_production: pq: authentification par mot de passe échouée pour l'utilisateur « user »
couldn't drop database myAppdb: error dropping PostgreSQL database myAppdb: pq: la base de données « user » n'existe pas
Meaning: buffalo seems to understand postgres://user:password as postgres://DATABASEr:password !
Any help, please ?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (9 by maintainers)
I have found work around:
And on my machine it completed, hopefully it will on yours
Not sure if this is related but itâs not working for me either, only the error doesnât make sense:
ERRO[0000] Error: couldnât create database vuerecipe: error creating PostgreSQL database vuerecipe: pq: database ârobvdlâ does not exist
What doesnât make sense in the error is that ârobvdlâ is not my db name, itâs my username, so why it is saying âdatabase robvdl does not existâ is beyond me, the db name is âvuerecipeâ and username ârobvdlâ.
I am getting the same error when doing a buffalo db drop.
buffalo db drop -a
I have made sure the robvdl user can log in with password and has createdb privileges, so not sure, this should be working.
If i manually create the databases and run buffalo db migrate itâs fine and creates tables, it just seems to have issues creating databases and dropping them.