Open jhansen2015 opened 1 month ago
Created a PR with a new DB_CREATE
option (default: true
for backward compatibility) to allow skipping the db:create
step.
Thanks for reporting this. I'm a bit behind at work right now but have not forgotten about this.
Is it possible for the code to check if the db exists before trying to create it instead?
Thanks for reporting this. I'm a bit behind at work right now but have not forgotten about this.
Thanks for taking time to look at it!
Is it possible for the code to check if the db exists before trying to create it instead?
I didn't find any code to check for db existence.
The migrate_database()
function in the functions
file creates the database and migrates it using the rake
tasks db:create
and db:migrate
. As far as I can tell, there are no relevant options to the db:create
task, and there is no separate rake db:...
task for checking for db existence.
The PR (#558) maintains backwards compatibility with existing behavior:
DB_CREATE
option defaults to true
, which is the pre-existing behavior, and, like the pre-existing behavior, if creation fails, the script will exit, although now with a more helpful message.false
), then the rake db:create
step will be skipped altogether.What do you think?
Problem statement: Cannot run
sameersbn/redmine:5.1.2-1
against an existing Postgres (10) database without permission to create databases.Versions:
sameersbn/redmine:5.1.2-1
Role and database created with:
Log from container: