Skip to content

Commit

Permalink
Clarify migrations when upgrading from version < 0.6.0
Browse files Browse the repository at this point in the history
As pointed out in #348
  • Loading branch information
rosa committed Sep 16, 2024
1 parent 0749c60 commit ad44cc8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Solid Queue is configured by default in new Rails 8 applications. But if you're

This will configure Solid Queue as the production Active Job backend, create the configuration files `config/queue.yml` and `config/recurring.yml`, and create the `db/queue_schema.rb`. It'll also create a `bin/jobs` executable wrapper that you can use to start Solid Queue.

Once you've done that, you will then have to add the configuration for the queue database in `config/database.yml`. If you're using sqlite, it'll look like this:
Once you've done that, you will then have to add the configuration for the queue database in `config/database.yml`. If you're using SQLite, it'll look like this:

```yaml
production:
Expand Down Expand Up @@ -56,7 +56,7 @@ For small projects, you can run Solid Queue on the same machine as your webserve

### Single database configuration

It's also possible to use one single database for both production data:
Running Solid Queue in a separate database is recommended, but it's also possible to use one single database for both the app and the queue. Just follow these steps:

1. Copy the contents of `db/queue_schema.rb` into a normal migration and delete `db/queue_schema.rb`
2. Remove `config.solid_queue.connects_to` from `production.rb`
Expand Down
10 changes: 2 additions & 8 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,17 @@ This version has two breaking changes regarding configuration:
- Recurring tasks are now defined in `config/recurring.yml` (by default). Before, they would be defined as part of the _dispatcher_ configuration. Now they've been upgraded to their own configuration file, and a dedicated process (the _scheduler_) to manage them. Check the _Recurring tasks_ section in the `README` to learn how to configure them in detail. They still follow the same format as before when they lived under `dispatchers > recurring_tasks`.

# Upgrading to version 0.8.x
*IMPORTANT*: This version collapsed all migrations into a single `db/queue_schema.rb`, that will use a separate `queue` database. If you're upgrading from a version < 0.6.0, you need to upgrade to 0.6.0 first, ensure all migrations are up-to-date, and then upgrade further.
*IMPORTANT*: This version collapsed all migrations into a single `db/queue_schema.rb`, that will use a separate `queue` database on install. If you're upgrading from a version < 0.6.0, you need to upgrade to 0.6.0 first, ensure all migrations are up-to-date, and then upgrade further. You don't have to switch to a separate `queue` database or use the new `db/queue_schema.rb` file, these are for people starting on a version >= 0.8.x. You can continue using your existing database (be it separate or the same as your app) as long as you run all migrations defined up to version 0.6.0.

# Upgrading to version 0.7.x

This version removed the new async mode introduced in version 0.4.0 and introduced a new binstub that can be used to start Solid Queue's supervisor.

To install both the binstub `bin/jobs` and the migration, you can just run
To install the binstub `bin/jobs`, you can just run:
```
bin/rails generate solid_queue:install
```

Or, if you're using a different database for Solid Queue:

```bash
$ bin/rails generate solid_queue:install --database <the_name_of_your_solid_queue_db>
```


# Upgrading to version 0.6.x

Expand Down

0 comments on commit ad44cc8

Please sign in to comment.