You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: UPGRADING.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,16 @@
1
1
# Upgrading to version 0.6.x
2
2
3
3
## New migration in 3 steps
4
-
This version adds a new migration to the `solid_queue_processes` table. This migration adds a new column that needs to be `NOT NULL`. It will run in three steps:
5
-
1. Add the new column, nullable
6
-
2. Backfill existing rows that would have the column as NULL
7
-
3. Make the column not nullable and add a new index
4
+
This version adds two new migrations to modify the `solid_queue_processes` table. The goal of that migration is to add a new column that needs to be `NOT NULL`. This needs to be done with two migrations and the following steps to ensure it happens without downtime and with new processes being able to register just fine:
5
+
1. Run the first migration that adds the new column, nullable
6
+
2. Deploy the updated Solid Queue code that uses this column
7
+
2. Run the second migration. This migration does two things:
8
+
- Backfill existing rows that would have the column as NULL
9
+
- Make the column not nullable and add a new index
8
10
9
-
To install it:
11
+
Besides, it adds another migration with no effects to the `solid_queue_recurring_tasks` table. This one can be run just fine whenever, as the column affected is not used.
12
+
13
+
To install the migrations:
10
14
```bash
11
15
$ bin/rails solid_queue:install:migrations
12
16
```
@@ -17,7 +21,7 @@ Or, if you're using a different database for Solid Queue:
And then follow the steps above, running first one, then deploying the code, then running the second one.
21
25
22
26
## New behaviour when workers are killed
23
27
From this version onwards, when a worker is killed and the supervisor can detect that, it'll fail in-progress jobs claimed by that worker. For this to work correctly, you need to run the above migration and ensure you restart any supervisors you'd have.
0 commit comments