Commit 8e9bc84
authored
Remove foreign key contraint in table job_warnings on 'fk_jobs_id' (#4174)
The job_warnings table was created in a wrong way. There are two columns 'job_id' and 'fk_jobs_id'.
There is a foreign key constraint on 'fk_jobs_id', which references jobs(id).
CC coding never inserts data into 'fk_jobs_id', but only into 'job_id'.
So the foreign key constraint is not needed and causes way slower cleanup of pollable jobs,
which can even run into DB statement timeouts and cause an ever growing table.1 parent 29c5749 commit 8e9bc84
File tree
2 files changed
+40
-0
lines changed- db/migrations
- spec/migrations
2 files changed
+40
-0
lines changedLines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
0 commit comments