Commit a7cd961
committed
Add composite template index on notification history
This is a temporary change to allow us to delete the old emergency alerts data.
The notification_history table has this foreign key constraint, which
makes trying to delete the template history for emergency alerts too slow to be
feasible:
```
"notification_history_templates_history_fkey" FOREIGN KEY (template_id, template_version) REFERENCES templates_history(id, version)
```
This commit adds a composite index which matches the foreign key
constraint.1 parent 06a8490 commit a7cd961
File tree
2 files changed
+23
-1
lines changed- migrations
- versions
2 files changed
+23
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 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 | + | |
0 commit comments