Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple databases for install generator #217

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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! 🙏 🙇‍♀️

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.

None yet

2 participants