在django连接数据库,执行数据库迁移时候报错django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table ((1064, “You have an error in your SQL syntax; check the m
anual that corresponds to your MySQL server version for the right syntax to use near ‘(6) NOT NULL)’ at line 1”))

原因是数据库版本与django版本不兼容,意味着我们前期的工作就白做了?可能面临这重新安装MySQL或者django降级升级。但是如果在项目里的话可能会影响到其他代码块,不推荐使用。
其实还有解决办法,既然是兼容性问题,那么让他兼容就行了

办法
在项目settings.py里面加入解决

#设置兼容
from django.db.backends.mysql.base import DatabaseWrapper
DatabaseWrapper.data_types['DateTimeField'] = 'datetime'

Unable to create the django_migrations table ((1064, “You have an error in your SQL syntax; check th相关推荐

  1. SQL查询1064报错 [ERR] 1064 - You have an error in your SQL syntax; check the manual.......

    MySQL建表出现1064问题问题 SQL语句 DROP DATABASE IF EXISTS bookstore; DROP DATABASE bookstore; USE bookstore; C ...

  2. 创建存储过程报错:1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQ

    自己写了一个创建存储过程的语句: create procedure abcd() begin       select * from area; end ; 语法什么的都没有错误,但是提示报错:106 ...

  3. 报错,> 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL

    错误: idea: 2020-12-23 15:26:13.885 ERROR 17972 --- [MessageBroker-2] o.h.engine.jdbc.spi.SqlException ...

  4. mysql报错系列持续整理1064 - You have an error in your SQL syntax;...near...

    前言 怎么又是这个错,感觉似曾相识之前遇到过多次了.是的这就是mysql语句报错1064 - You have an error in your SQL .syntax;...near...感觉每次不 ...

  5. 【报错】ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds t

    设置mysql中的root账户密码出现1064错误代码 ERROR 1064 (42000): You have an error in your SQL syntax; check the manu ...

  6. ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your

    mysq5.7中报错 执行下面语句报错 mysql> grant replication slave on . to 'myslave'@'192.168.136.%' identified b ...

  7. 修改mysql密码时遇见ERROR 1064 (42000) You have an error in your SQL syntax; check the manual that correspo

    修改mysql密码时遇见ERROR 1064 (42000) You have an error in your SQL syntax; check the manual that correspon ...

  8. 修改mysql的密码时遇到问题ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corre

    由于找不到mysql的初始密码,我用免密码的方式在cmd中进入mysql对密码做了修改,并且最后成功修改了,但是走了一些弯路,就此记录一下. 注意 :我想要改为的密码为 mysql,大家想要什么密码设 ...

  9. ERROR 1064 (42000) You have an error in your SQL syntax; check the manual that corresponds to your

    在MySQL中导入.sql文件时 通过 use data source C:/info.sql use data(数据库名称为data) source C:/info.sql(提前把.sql文件放入一 ...

最新文章

  1. python3 for mac_PyCharm for Mac-PyCharm Mac版下载 V2018.3.2-PC6苹果网
  2. sam机架和kx连线图_「声卡跳线」雅马哈UR22C/UR24C声卡设置机架直播K歌
  3. python电脑下载-Python3.9官方下载
  4. Android系统自带样式(@android:style/) (转)
  5. InDesign教程,如何对齐和调整对象位置?
  6. PDF文档全篇免费翻译技巧
  7. 自然语言处理 4.语义分析
  8. 答题卡 移动端在线考试html模板,标准化考试答题卡模板.doc
  9. 苹果mac休眠快捷键_新手小白用苹果电脑搞科研,学会这些才不至于尴尬!
  10. 深入了解创宇网络安全硬件产品--零信任(ZTSA)
  11. 红外接收C语言实现 NEC 定时器
  12. 服务器字体显示繁体字怎么解决,win7繁体字乱码怎么办?win7繁体字显示乱码解决方法...
  13. 关于侵权Sinesafe官方网站,仿冒、抄袭等恶劣行为的公告
  14. 洛谷CF499B Lecture + 映射map
  15. 家用监控器怎么选择,怎么连接手机远程监控,保存多久视频
  16. 低代码平台有哪些?织信informat怎么样?
  17. 图片清晰度如何修复?简单的修复方法来了
  18. 头条.搜索历史记录,文章详情页
  19. MT6575驱动调试笔记
  20. matlab strel函数用法

热门文章

  1. 瑞吉外卖 - 项目流程介绍与数据库搭建、附Gitee地址(更新中...)
  2. Windows系统下载镜像网站
  3. JVM内存调优之GC算法
  4. INSERT INTO … SELECT 锁表问题
  5. 修复计算机 数据丢失吗,电脑系统崩溃怎么修复及数据丢失找回教程
  6. LVS负载均衡-基础知识梳理
  7. Ceph 读写路径源代码分析(1)
  8. MySQL导入官方数据库world防踩坑完全操作
  9. C语言例题14:直接插入排序
  10. Web应用程序压力测试