Skip to content

Commit

Permalink
Fixed migration with apps that use ATCORE. (#944)
Browse files Browse the repository at this point in the history
* fix to avoid the trigger not found error

* remove comments and white_spaces

* reformatted with black

* remove comment
  • Loading branch information
romer8 committed May 9, 2023
1 parent 9092c87 commit 2c328b2
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions tethys_apps/migrations/0002_auto_20230407_2337.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@ def forward(apps, schema_editor):
type=cs.type,
)
cs_child.save()
cs.delete()


def backward(apps, schema_editor):
"""From CustomBaseSetting inheritance to non inheritance"""
CustomBaseSetting = apps.get_model("tethys_apps", "CustomSettingBase")
CustomSetting = apps.get_model("tethys_apps", "customsetting")
OldCustomSetting = apps.get_model("tethys_apps", "oldcustomsetting")

Expand All @@ -45,10 +43,6 @@ def backward(apps, schema_editor):
type=cs.type,
)
cs_old.save()
cs.delete()

for cs_parent in CustomBaseSetting.objects.using(db_alias).all():
cs_parent.delete()


class Migration(migrations.Migration):
Expand Down

0 comments on commit 2c328b2

Please sign in to comment.