TalentBox / sequel-rails

A gem for using Sequel with Rails 5.x, 6.x, 7.x, 8.x
http://talentbox.github.io/sequel-rails/
MIT License
326 stars 81 forks source link

Use settings in jdbc url for createdb and dropdb #164

Closed alksl closed 6 years ago

alksl commented 6 years ago

SequelRails::Storage::Postgres assumes that username, host, port and password is set in the config. Otherwise it connects to localhost regardless of the contents of the jdbc URL which breaks e.i. rake db:test:prepare. This change parses the contents of jdbc URL (for postgresql) and sets these fields if they do not have any value.