solid_queue icon indicating copy to clipboard operation
solid_queue copied to clipboard

Support multiple databases for install generator

Open fractaledmind opened this issue 1 year ago • 3 comments

Currently, there is no way to specify that the migration files be installed into a separate database from the default. This is problematic especially for SQLite apps, since the recommended approach is to use a separate SQLite database for the queue.

This change supports the existing behavior as well as specifying the --database option or the --db option.

fractaledmind avatar May 01 '24 22:05 fractaledmind

@rosa: I can't figure out how the solid_queue:install:migrations Rake task is defined, so I can't then figure out if there is any way to specify a specific database for that task or not.

fractaledmind avatar May 01 '24 23:05 fractaledmind

I will also add to the README and some tests

fractaledmind avatar May 01 '24 23:05 fractaledmind

Thank you so much @fractaledmind! This is related to https://github.com/rails/solid_queue/issues/144.

The solid_queue:install:migrations task is given by Rails's Engine and yes! It does allow specifying a database via the DATABASE environment variable, it was added in https://github.com/rails/rails/pull/48579.

Thank you again! 🙏 🙇‍♀️

rosa avatar May 02 '24 20:05 rosa

In the end, I included this change in #308, as I had to change the generator. I completely missed that this one was completed; I thought something was missing! So sorry 😓

rosa avatar Sep 02 '24 12:09 rosa