drop alert_receive_channel.restricted_at column (#2646)
# What this PR does Drop `alert_receive_channel.restricted_at` column ## 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] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not required) --------- Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
This commit is contained in:
parent
55299995f7
commit
e15d18a604
2 changed files with 19 additions and 6 deletions
|
|
@ -0,0 +1,19 @@
|
|||
# Generated by Django 3.2.20 on 2023-07-26 06:41
|
||||
|
||||
from django.db import migrations
|
||||
import django_migration_linter as linter
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("alerts", "0027_remove_alertreceivechannel_restricted_at_from_state"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
linter.IgnoreMigration(),
|
||||
migrations.RunSQL(
|
||||
sql="ALTER TABLE alerts_alertreceivechannel DROP COLUMN restricted_at",
|
||||
reverse_sql="ALTER TABLE alerts_alertreceivechannel ADD COLUMN restricted_at datetime(6) NULL"
|
||||
)
|
||||
]
|
||||
|
|
@ -198,12 +198,6 @@ class AlertReceiveChannel(IntegrationOptionsMixin, MaintainableObject):
|
|||
rate_limited_in_slack_at = models.DateTimeField(null=True, default=None)
|
||||
rate_limit_message_task_id = models.CharField(max_length=100, null=True, default=None)
|
||||
|
||||
# TODO: in a subsequent release, write a manual django migration to run the following
|
||||
# migrations.RunSQL(
|
||||
# sql = "ALTER TABLE alerts_alertreceivechannel DROP COLUMN restricted_at",
|
||||
# reverse_sql = migrations.RunSQL.noop
|
||||
# )
|
||||
|
||||
class Meta:
|
||||
constraints = [
|
||||
models.UniqueConstraint(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue