Unable to create the django_migrations table ((1064, “You have an error in your SQL syntax; check th
在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相关推荐
- 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 ...
- 创建存储过程报错: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 ...
- 报错,> 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 ...
- mysql报错系列持续整理1064 - You have an error in your SQL syntax;...near...
前言 怎么又是这个错,感觉似曾相识之前遇到过多次了.是的这就是mysql语句报错1064 - You have an error in your SQL .syntax;...near...感觉每次不 ...
- 【报错】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 ...
- 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 ...
- 修改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 ...
- 修改mysql的密码时遇到问题ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corre
由于找不到mysql的初始密码,我用免密码的方式在cmd中进入mysql对密码做了修改,并且最后成功修改了,但是走了一些弯路,就此记录一下. 注意 :我想要改为的密码为 mysql,大家想要什么密码设 ...
- 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文件放入一 ...
最新文章
- python3 for mac_PyCharm for Mac-PyCharm Mac版下载 V2018.3.2-PC6苹果网
- sam机架和kx连线图_「声卡跳线」雅马哈UR22C/UR24C声卡设置机架直播K歌
- python电脑下载-Python3.9官方下载
- Android系统自带样式(@android:style/) (转)
- InDesign教程,如何对齐和调整对象位置?
- PDF文档全篇免费翻译技巧
- 自然语言处理 4.语义分析
- 答题卡 移动端在线考试html模板,标准化考试答题卡模板.doc
- 苹果mac休眠快捷键_新手小白用苹果电脑搞科研,学会这些才不至于尴尬!
- 深入了解创宇网络安全硬件产品--零信任(ZTSA)
- 红外接收C语言实现 NEC 定时器
- 服务器字体显示繁体字怎么解决,win7繁体字乱码怎么办?win7繁体字显示乱码解决方法...
- 关于侵权Sinesafe官方网站,仿冒、抄袭等恶劣行为的公告
- 洛谷CF499B Lecture + 映射map
- 家用监控器怎么选择,怎么连接手机远程监控,保存多久视频
- 低代码平台有哪些?织信informat怎么样?
- 图片清晰度如何修复?简单的修复方法来了
- 头条.搜索历史记录,文章详情页
- MT6575驱动调试笔记
- matlab strel函数用法