Commit 5ff0968d by Clinton Blackburn

Removed migrations for the api app

The two migrations negate each other, so there is no need to squash them.

Operators should run the following command to clean migration history for this app:
./manage.py migrate --fake api zero

ECOM-6269
parent 70f69c9e
from django.db import migrations
def create_switch(apps, schema_editor):
"""Create the reduced_program_data switch."""
Switch = apps.get_model('waffle', 'Switch')
Switch.objects.get_or_create(name='reduced_program_data', defaults={'active': False})
def delete_switch(apps, schema_editor):
"""Delete the reduced_program_data switch."""
Switch = apps.get_model('waffle', 'Switch')
Switch.objects.filter(name='reduced_program_data').delete()
class Migration(migrations.Migration):
dependencies = [
('waffle', '0001_initial'),
]
operations = [
migrations.RunPython(create_switch, reverse_code=delete_switch),
]
from django.db import migrations
def delete_switch(apps, schema_editor):
"""Delete the reduced_program_data switch."""
Switch = apps.get_model('waffle', 'Switch')
Switch.objects.filter(name='reduced_program_data').delete()
class Migration(migrations.Migration):
dependencies = [
('waffle', '0001_initial'),
('api', '0001_create_reduced_program_data_switch'),
]
operations = [
migrations.RunPython(delete_switch, reverse_code=migrations.RunPython.noop),
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment