标签:util tom table int 就是 数据库表 The ror code
修改了数据库表名之后,更新数据库时跳错:
django.db.utils.NotSupportedError: Renaming the ‘app_class‘ table while in a transaction is not supported on SQLite because it would break referential integrity. Try adding atomic = False to the Migration class.
意思就是 SQLite 数据库不支持重命名的操作,添加atomic = False
即可:
Migration 在 \py36\Lib\site-packages\django\db\migrations\migration.py 的位置
将 atomic = True
改成 atomic = False
标签:util tom table int 就是 数据库表 The ror code
原文地址:https://www.cnblogs.com/JeromeLong/p/13195485.html