Skip to content

Commit 5db2a6b

Browse files
committed
Include instructions to set a different DB for the migrations
In the deprecation warning and upgrade instructions.
1 parent 6fe96aa commit 5db2a6b

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
@@ -19,7 +19,9 @@ def warn_about_pending_migrations
1919
SolidQueue.deprecator.warn(<<~DEPRECATION)
2020
Solid Queue has pending database migrations. To get the new migration files, run:
2121
rails solid_queue:update
22-
And then:
22+
which will install the migration under `db/queue_migrate`. To change the database, run
23+
DATABASE=your-solid-queue-db rails solid_queue:update
24+
Then, apply the migrations with:
2325
rails db:migrate
2426
These migrations will be required after version 2.0
2527
DEPRECATION

0 commit comments

Comments
 (0)