def migrate(self, targets):
"""
Migrate to a new state.
MigrationExecutors can not be reloaded, as they cache the state of the
migrations when created. Attempting to reuse one might make some
migrations not run, as it thinks they have already been run.
"""
executor = MigrationExecutor(connection)
executor.migrate(targets)
# Cant load state for apps in the initial empty state
state_nodes = [node for node in targets if node[1] is not None]
return executor.loader.project_state(state_nodes).apps
test_field.py 文件源码
python
阅读 29
收藏 0
点赞 0
评论 0
评论列表
文章目录