Skip to content

Commit

Permalink
Add RiskyAlterField to utils/migrations (#93)
Browse files Browse the repository at this point in the history
* Add RiskyAlterField to utils/migrations

* Remove duplicate RiskyAddField class

Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
  • Loading branch information
joseph-sentry committed Sep 6, 2023
1 parent 509f99d commit 99b7ba9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/migrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def database_backwards(self, app_label, schema_editor, from_state, to_state):
super().database_backwards(app_label, schema_editor, from_state, to_state)


class RiskyRemoveField(migrations.RemoveField):
class RiskyAlterField(migrations.AlterField):
def database_forwards(self, app_label, schema_editor, from_state, to_state):
if settings.SKIP_RISKY_MIGRATION_STEPS:
return
Expand All @@ -38,7 +38,7 @@ def database_backwards(self, app_label, schema_editor, from_state, to_state):
super().database_backwards(app_label, schema_editor, from_state, to_state)


class RiskyAddField(migrations.AddField):
class RiskyRemoveField(migrations.RemoveField):
def database_forwards(self, app_label, schema_editor, from_state, to_state):
if settings.SKIP_RISKY_MIGRATION_STEPS:
return
Expand Down

0 comments on commit 99b7ba9

Please sign in to comment.