def migrate(self, ops, state=None):
class Migration(migrations.Migration):
operations = ops
migration = Migration('name', 'tests')
inject_trigger_operations([(migration, False)])
with connection.schema_editor() as schema_editor:
return migration.apply(state or ProjectState.from_apps(self.apps), schema_editor)
评论列表
文章目录