我需要以编程方式应用Django迁移,例如:
class Migration(migrations.Migration):
dependencies = [
('some_app', '0001_initial'),
]
operations = [
migrations.AlterIndexTogether(
name='some_model',
index_together=set([('some_field_one', 'some_field_two')]),
),
]
有办法吗?我尝试使用apply方法,但无法弄清楚如何使其工作。