-
-
Notifications
You must be signed in to change notification settings - Fork 116
Open
Labels
Description
Description
A change in the way we use the postgresql role means that the CREATEDB privilege is not passed on to the user creation. We can't drop and create the database. That is useful when importing another database, for example when switching production servers.
Expected Behavior
DISABLE_DATABASE_ENVIRONMENT_CHECK=1 I_AM_SURE=1 bundle exec rails db:drop db:create
# database created
Actual Behaviour
DISABLE_DATABASE_ENVIRONMENT_CHECK=1 I_AM_SURE=1 bundle exec rails db:drop db:create
# error on db:create
Steps to Reproduce
- Fresh server, for example with
vagrant destroy; vagrant up
. - Provision and deploy.
- Try to re-create the database.
Animated Gif/Screenshot
Severity
Your Environment
- Version used:
- Browser name and version:
- Operating System and version (desktop or mobile):
Possible Fix
We added some workarounds in ebd62cd which could now be removed if we upgrade the postgresql role.
Workaround
Give the user permission manually:
# sudo -u postgres psql
alter user ofn_user createdb;
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
All the things 💤