django-registration (1048, “Column 'last_login' cannot be null”)
Go to your database (MySQL Terminal):
$ mysql
mysql> SELECT * FROM django_migrations;
If you see some records, good. Delete them.
mysql> TRUNCATE TABLE django_migrations;
Leave MySQL terminal, and run the migrations again in django:
$ python manage.py migrate --fake-initial
Make sure this message appears:
0005_alter_user_last_login_null - [OK]
then you might see some other conflicts, that is fine because we only need to make this migration.
Restart your MySQL and Server and you're good to go.
django-registration (1048, “Column 'last_login' cannot be null”)的更多相关文章
- 解决"django-registration(1048,“column”last_login“不能为null”)
去数据库(MySQL终端): 1.查看django_migrations表的信息.如果你看到一些记录,删除它们(如果migrations目录下有原来的配置,需要清除). mysql> SELEC ...
- com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'goodsName' cannot be null
com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'goodsName' cannot be n ...
- You can add an index on a column that can have NULL values if you are using the MyISAM, InnoDB, or MEMORY storage engine.
w https://dev.mysql.com/doc/refman/5.7/en/create-index.html MySQL :: MySQL 5.7 Reference Manual :: B ...
- sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) Cannot add a NOT NULL column with default value NULL [SQL: u'ALTER TABLE address_scopes ADD COLUMN ip_version INTEGER NOT NULL']
root@hett-virtual-machine:~# su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neu ...
- mysql.connector.errors.IntegrityError: 1048 (23000): Column 'request_url' cannot be null
箭头指向的2的方向 少了一个request_url的值 调试: 直接 执行sql语句 是没问题的, 这样就知道问题是出在代码的逻辑 处理了: INSERT INTO response_time (nu ...
- django migrate10060 Duplicate column name错误
这个错误意思是有重复的列名,其实大部分原因是因为某些列被执行了多次,可以打开migration里面的django生成的文件去排查错误,然后自己手动修改数据库还原,实在不行可以把除了0001和init文 ...
- mysql5.7 column cannot be null
背景 独立测试环境安装了数据库,但安装的版本是mysql 5.7的版本,而研发用的是mysql5.6的版本,在执行某个数据库操作的提示,提示column “xxxx”cannot be null 问题 ...
- Django开发常见问题
1.Django设置中文,和时区.静态文件指向 #========================================================== # 设置时区 注意注释上面的:L ...
- django manytomany
转载:http://my.oschina.net/u/572994/blog/105280 例如有如下模型 models.py ? 1 2 3 4 5 6 7 from django.db impor ...
随机推荐
- 在虚拟机搭建JStrom
原文:http://blog.csdn.net/u014134180/article/details/51810311 一 安装步骤 二 搭建Zookeeper集群 1 ZooKeeper 单机安装与 ...
- AIM Tech R3 div2 E Centroid
思路很明显了,假设是点x,则看它的子树中是否有大于n/2的,如果有,则在该子树中剪去它可以剪的且小于n/2的,接到点x上. 则统计出在以x点为根的子树中,它的各子树可以剪去的且小于n/2的最大子子树. ...
- HTTP请求方式之GET和POST比较
什么是HTTP协议 超文本传输协议(HyperText Transfer Protocol -- HTTP)是一个设计来使客户端和服务器顺利进行通讯的协议 HTTP在客户端和服务器之间以request ...
- OJ-online judegement
OJ-online judegement https://baike.baidu.com/item/OJ/8129019?fr=aladdin
- JSP简单练习-包装类综合应用实例
<%@ page contentType="text/html; charset=gb2312" %><!-- JSP指令标签 --> <%@ pag ...
- vuex资料
vuex最简单.最详细的入门文档 链接:https://segmentfault.com/a/1190000009404727 https://www.jb51.net/article/138239. ...
- 前端开发本地环境配置(Apache+Dreamweaver)
一.安装apache服务器 1.下载apache软件: 2.安装,直接下一步就好: 3.安装好后找到安装文件夹下的conf文件中的httpd.conf: 4.打开httpd.conf文件,做以下修改: ...
- ArcGIS中生成蜂窝多边形算法解析
近来有不少同学.都有问我关于蜂窝多边形的问题.也就是正六边形,也就是以下这个东东: 一般的问答模式例如以下: 亲们问:ArcGIS里面那个工具能够做这个东东? 虾神答:额,没有原生的工具. 亲们问:那 ...
- PNG vs. GIF vs. JPEG vs. SVG - When best to use?
image - PNG vs. GIF vs. JPEG vs. SVG - When best to use? - Stack Overflow https://stackoverflow.com/ ...
- spring 之 IOC 依赖注入详解
当我们对一个javaBean进行实例化时,在原本的情况下我们会选择新建一个接口,然后进行实例化,为了进一步降低耦合度我们还会使用工厂模式进行封装. 例: 当我们想要去造,Chinese.America ...