I need to apply a Django migration programmatically, for example this one:
class Migration(migrations.Migration):
dependencies = [
('some_app', '0001_initial'),
]
operations = [
migrations.AlterIndexTogether(
name='some_model',
index_together=set([('some_field_one', 'some_field_two')]),
),
]
Is there a way to do it? I tried to use apply method, but couldn't figure out how to make it work.