-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: remove references to SlackMessage._channel_id
#5325
Conversation
…tGroup.prevent_posting_alerts`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe this is needed anymore? (was removing engine/engine/management/commands/batch_migrate_slack_message_channel.py
and decided to remove this as well)
SlackMessage._channel_id
+ remove AlertGroup.prevent_posting_alerts
SlackMessage._channel_id
@@ -417,6 +417,10 @@ def status(self) -> int: | |||
) | |||
|
|||
prevent_posting_alerts = models.BooleanField(default=False) | |||
""" | |||
TODO: this column is no longer used, drop it in a subsequent PR/release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hesitant to do this operation in this PR, clean-up for another day 🙂
operations = [ | ||
common.migrations.remove_field.RemoveFieldDB( | ||
model_name="SlackMessage", | ||
name="active_update_task_id", | ||
remove_state_migration=("slack", "0008_remove_slackmessage_active_update_task_id_state"), | ||
), | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is instant (on a prod clone):
mysql> ALTER TABLE slack_slackmessage DROP COLUMN active_update_task_id;
Query OK, 0 rows affected (0.80 sec)
Records: 0 Duplicates: 0 Warnings: 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…on` fields (#5340) # What this PR does Follow-up cleanup PR for #5325 (and #5330) ## 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.
What this PR does
SlackMessage.channel_id
(CHAR
field) toSlackMessage.channel
(foreign key relationship) #5292, and now thatSlackMessage.channel
has been migrated viaengine/apps/slack/migrations/0007_migrate_slackmessage_channel_id.py
, this PR removes reads/writes fromSlackMessage._channel_id
toSlackMessage.channel
. In a separate PR I will focus on dropping that column from the model/db.SlackMessage.active_update_task_id
. There're zero references to this column in the codebase.manage.py
commands that're no longer needed:engine/engine/management/commands/alertmanager_v2_migrate.py
(and it's associated tests)engine/engine/management/commands/batch_migrate_slack_message_channel.py
Checklist
pr:no public docs
PR label added if not required)release:
). These labels dictate how your PR willshow up in the autogenerated release notes.