最近本人在学习Django框架,在练习数据库迁移时一直报错,查了半天找不到原因,我每一步都是按照教学,甚至重做了N遍,劳烦各位帮忙解惑。
raise MigrationSchemaMissing("Unable to create the django_migrations table (%s)" % exc)
django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table ((1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6) NOT NULL)' at line 1"))
#抛出migrationschemammissing ("Unable to create the django_migrations table (%s)") % exc)
#django.db.migrations.exceptions. migrationschemammissing:无法创建django_migrations表(1064,"你的SQL语法出错; 检查对应于您的MySQL服务器版本的手册,以正确的语法使用接近'(6)NOT NULL)'在第1行"))

用Django框架数据库迁移SQL语法错误
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
2条回答 默认 最新
- python收藏家 2021-10-13 11:51关注
要看你django版本和mysql版本是不是匹配
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 1无用