-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: patch recent migration files that drop db columns (#5277)
# What this PR does - patch recent migration files which drop several deprecated DB columns which led to a recent (minor/internal) issue - add a CI job to prevent this from happening in the future and instead, force folks to drop columns [the _proper_ way](https://github.com/grafana/oncall/tree/dev/dev#removing-a-nullable-field-from-a-model) (which we have documented internally) (as documented [here](https://github.com/grafana/oncall/tree/dev/dev#removing-a-nullable-field-from-a-model), I have the four additional migration files (which actually do the `DROP COLUMN`s in the db) saved locally, and will include these in a separate PR/release) ## Checklist - [x] Unit, integration, and e2e (if applicable) tests updated - [x] Documentation added (or `pr:no public docs` PR label added if not required) - [x] Added the relevant release notes label (see labels prefixed w/ `release:`). These labels dictate how your PR will show up in the autogenerated release notes.
- Loading branch information
1 parent
6334763
commit dd65732
Showing
6 changed files
with
95 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
engine/apps/alerts/migrations/0067_remove_channelfilter__slack_channel_id_state.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 4.2.16 on 2024-11-20 20:21 | ||
|
||
import common.migrations.remove_field | ||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('alerts', '0066_remove_channelfilter__slack_channel_id_and_more'), | ||
] | ||
|
||
operations = [ | ||
common.migrations.remove_field.RemoveFieldState( | ||
model_name='channelfilter', | ||
name='_slack_channel_id', | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
.../apps/alerts/migrations/0068_remove_resolutionnoteslackmessage__slack_channel_id_state.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 4.2.16 on 2024-11-20 20:23 | ||
|
||
import common.migrations.remove_field | ||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('alerts', '0067_remove_channelfilter__slack_channel_id_state'), | ||
] | ||
|
||
operations = [ | ||
common.migrations.remove_field.RemoveFieldState( | ||
model_name='resolutionnoteslackmessage', | ||
name='_slack_channel_id', | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters