diff --git a/engine/apps/alerts/migrations/0005_alertgroup_cached_render_for_web.py b/engine/apps/alerts/migrations/0005_alertgroup_cached_render_for_web.py index e8ac0970..cff73da3 100644 --- a/engine/apps/alerts/migrations/0005_alertgroup_cached_render_for_web.py +++ b/engine/apps/alerts/migrations/0005_alertgroup_cached_render_for_web.py @@ -1,6 +1,6 @@ # Generated by Django 3.2.13 on 2022-07-20 09:04 -from django.db import migrations, models, OperationalError +from django.db import migrations, models, OperationalError, ProgrammingError class AddFieldIfNotExists(migrations.AddField): @@ -14,6 +14,9 @@ class AddFieldIfNotExists(migrations.AddField): super().database_forwards(app_label, schema_editor, from_state, to_state) except OperationalError: pass + except ProgrammingError as e: # ignore if the field already exists + if "already exists" in str(e): + pass def database_backwards(self, app_label, schema_editor, from_state, to_state): pass @@ -27,6 +30,7 @@ class Migration(migrations.Migration): it will recreate these fields. """ + atomic = False dependencies = [ ('alerts', '0004_auto_20220711_1106'), ]