You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firstly, thank you for all the work on solid queue so far!
Apologies if this is lack of understanding and user-error on my part, but when the docs mention supporting solid queue on a different database than the main app (via connects_to), does that mean that the install/migration commands should automatically pick up on the settings I've defined in my app's config/database.yml for the given connects_to database key, or do I still need to manually tell solid queue which one to use when running those?
Currently, with the config and database.yml settings listed below for a separate :solid_queue db, when I run bin/rails generate solid_queue:install or bin/rails solid_queue:install:migrations, the migration files for the SolidQueue tables are copied to the db/migrate folder, resulting in the tables getting added to the :primary db instead of the :solid_queue one. However, I would have expected the install to copy them to db/solid_queue_migrate, to match the migrations_paths defined in database.yml for the solid_queue db)
If I manually pass in the DATABASE as an arg to the migration command (bin/rails solid_queue:install:migrations DATABASE=solid_queue), then things do work as expected, with files copied to db/solid_queue_migrate and added to the solid_queue db). If this is how it's meant to work, maybe that can be made a little clearer in the docs. Thanks!
The text was updated successfully, but these errors were encountered:
@dianacamacho, thank you so much for this detailed and carefully written issue! You're spot on, DATABASE=solid_queue (or I think --database solid_queue works as well, but I haven't tested it) is how this should be used.
Would you like to submit a PR to include this in the README?
re: --database solid_queue, i also tried that out at first but it returned invalid option: --database 🤔 . it didn't work unless i passed the db option as DATABASE=solid_queue
Firstly, thank you for all the work on solid queue so far!
Apologies if this is lack of understanding and user-error on my part, but when the docs mention supporting solid queue on a different database than the main app (via
connects_to
), does that mean that the install/migration commands should automatically pick up on the settings I've defined in my app'sconfig/database.yml
for the givenconnects_to
database key, or do I still need to manually tell solid queue which one to use when running those?Currently, with the config and
database.yml
settings listed below for a separate:solid_queue
db, when I runbin/rails generate solid_queue:install
orbin/rails solid_queue:install:migrations
, the migration files for theSolidQueue
tables are copied to thedb/migrate
folder, resulting in the tables getting added to the:primary
db instead of the:solid_queue
one. However, I would have expected the install to copy them todb/solid_queue_migrate
, to match themigrations_paths
defined indatabase.yml
for thesolid_queue
db)If I manually pass in the
DATABASE
as an arg to the migration command (bin/rails solid_queue:install:migrations DATABASE=solid_queue
), then things do work as expected, with files copied todb/solid_queue_migrate
and added to thesolid_queue
db). If this is how it's meant to work, maybe that can be made a little clearer in the docs. Thanks!The text was updated successfully, but these errors were encountered: