Skip to content

Conversation

@fractaledmind
Copy link

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.

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
Copy link
Author

@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
Copy link
Author

I will also add to the README and some tests

@rosa
Copy link
Member

rosa commented May 2, 2024

Thank you so much @fractaledmind! This is related to #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 rails/rails#48579.

Thank you again! 🙏 🙇‍♀️

@rosa
Copy link
Member

rosa commented Sep 2, 2024

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 rosa closed this Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants