Skip to content

Commit e05f2f7

Browse files
committed
Include instructions to set a different DB for the migrations
In the deprecation warning and upgrade instructions.
1 parent 0e2644c commit e05f2f7

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

UPGRADING.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# Upgrading to version 1.3
2-
There's a new migration in this version that can be installed via
2+
There's a new migration in this version that can be installed via:
33
```bash
44
bin/rails solid_queue:update
55
```
6-
which is a new generator to facilitate updates.
6+
which is a new generator to facilitate updates. This will use the `queue` database by default, but if you're using a different database name for Solid Queue, you can install the new migrations in the right place with:
7+
```bash
8+
DATABASE=your-solid-queue-db-name bin/rails solid_queue:update
9+
```
710

8-
Then, the migration needs to be run with
11+
Finally, the migration needs to be run with:
912
```bash
1013
bin/rails db:migrate
1114
```

app/models/solid_queue/record.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ def warn_about_pending_migrations
2525
SolidQueue.deprecator.warn(<<~DEPRECATION)
2626
Solid Queue has pending database migrations. To get the new migration files, run:
2727
rails solid_queue:update
28-
And then:
28+
which will install the migration under `db/queue_migrate`. To change the database, run
29+
DATABASE=your-solid-queue-db rails solid_queue:update
30+
Then, apply the migrations with:
2931
rails db:migrate
3032
These migrations will be required after version 2.0
3133
DEPRECATION

0 commit comments

Comments
 (0)