问题原因是,修改字段后,同步失败了,然后执行查询的时候,就会提示这个错误,这个字段没有

最暴力的方法可以直接在数据库中修改字段,但是修改后,models没同步,可能会存在问题,因此开始我的百度之旅(这个问题网上资料还真的挺少的)

方法一,不要犹豫,重启大法,关闭项目,关闭开发工具,从新打开,这个方法好像不行
方法二,删除大法,因为django有models在,数据库建表还是很容易的,只不过是数据丢失了,对我我这种不正经的开发来说,无关紧要咯

所以,我删除了库,删除了django生成的migrations(画重点),

然后重新建表,迁移,结果makemigrations,提示“No changes detected”,

问题就在这里,不能删除migrations文件夹,这个文件夹是要存放models的修改记录的,如果删除了,可以用python manage.py makemigrations --empty booktest 重新生成,然后在迁移

django 修改字段后,同步数据库,失败:django.db.utils.InternalError: (1054, "Unknown column 'api_config.project_id_id' in 'field list'")的更多相关文章

  1. 迁移文件是报错 django.db.utils.InternalError: (1054, "Unknown column 'name' in 'django_content_type'")

    相信大家在做django迁移时有可能会遇到这样的错误- django.db.utils.InternalError: (1054, “Unknown column ‘name’ in ‘django_ ...

  2. django.db.utils.InternalError: (1060, "Duplicate column name 'user_id'")迁移报错解决方法

    django.db.utils.InternalError: (1060, "Duplicate column name 'user_id'")迁移报错解决方法 django.db ...

  3. 解决django.db.utils.InternalError: (1049, "Unknown database 'exam_db'")

    先检查seeting数据库配置DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'eaxm_db', ' ...

  4. django更换数据库时提示"django.db.utils.InternalError: (1366, "Incorrect string value: '\\xE7\\x94\\xA8\\xE6\\x88\\xB7' for column 'name' at row 1")"

    问题提出 昨天在运行django时,初始化使用的是自带的数据库,后来更换mysql数据库,数据库同步之后,打开mysql无法添加数据,插入数据时,提示django.db.utils.InternalE ...

  5. 【BUG】插入或者更新超过限制后写入数据库失败

      Error Code: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your ...

  6. django.db.utils.InternalError: (1091, "Can't DROP 'cre_time'; check that column/key exists")

    在执行命令python manage.py migrate时报错:django.db.utils.InternalError: (1091, “Can’t DROP ‘cre_time’; check ...

  7. django 连接MYSQL时,数据迁移时报:django.db.utils.InternalError: (1366, "Incorrect string value: '\\xE9\\x97\\xAE\\xE9\\xA2\\x98' for column 'name' at row 5")

    django 连接MYSQL时,数据迁移时报:django.db.utils.InternalError: (1366, "Incorrect string value: '\\xE9\\x ...

  8. mysql修改字段长度及pymysql.err.DataError: (1406, "Data too long for column 'name' at row 1")错误

    文章链接:修改字段:https://blog.csdn.net/xiejunna/article/details/78580682 错误分析:https://blog.csdn.net/qq_4214 ...

  9. Error Code: 1054. Unknown column '字段名' in 'field list'

    问题描述: j博主在java开发过程中,通过读取excel中表名和字段名,动态创建insert的SQL语句,在mysql可视化工具中执行此SQL语句时,一直提示"Error Code: 10 ...

随机推荐

  1. Python发送邮件(常见四种邮件内容)

    Python发送邮件(常见四种邮件内容) 转载 2017年03月03日 17:17:04   转自:http://lizhenliang.blog.51cto.com/7876557/1875330 ...

  2. 微信小程序 button 组件

    button 组件 拥有强大的功能 自身可以拥有很多跟微信风格的样式,且是 表单 和 开放的能力 重要的 按钮 button 的属性: size: 类型 字符串 按钮的大小 属性值:default 默 ...

  3. pepflashplayer32_25_0_0_127.dll: 0x59952C6D is not a valid instance ID.

    pepflashplayer32_25_0_0_127.dll: 0x59952C6D is not a valid instance ID. . 点进去是提示doctype错误 暂时没有解决---- ...

  4. day02-Python基础

    >>> if a > b:... c = a+b... else:... c = a-b...>>> c-1 三元运算: >>> c = a ...

  5. Bash is an sh-compatible command language interpreter that executes commands read from the standard input or from a file.

    w https://linux.die.net/man/1/bash bash - GNU Bourne-Again SHell Description Bash is an sh-compatibl ...

  6. 在sql中使用函数,遇到net.sf.jsqlparser.parser.ParseException异常

    异常详情如下 Caused by: net.sf.jsqlparser.parser.ParseException: Encountered " "->" &quo ...

  7. 博客中gitalk最新评论的获取 github api使用

    博客中,对于网友的评论以及每篇文章的评论数还是很重要的.但是基于静态的页面想要存储动态的评论数据是比较难的,一般博客主题中都内置了评论插件,但是博客主题中对于最新评论的支持显示还是很少的,至少目前我是 ...

  8. 【ABAP系列】SAP 业务界面同时显示KEY和文本

      公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[MM系列]SAP 业务界面同时显示KEY和 ...

  9. 疯狂Java学习

    面向对象(下) 6.3:类成员:又讲了一遍static修饰的类成员:   Singleten(单例)类: 通过封装的方式,实现了一个类只能创建一次,应该是为了更好编写代码,创造的一个概念. 6.4:f ...

  10. 前端003/【React + Mobx + NornJ】开发模式

    1.React + Mobx + NornJ 开发模式快速上手教程 github网址:https://github.com/joe-sky/nornj-cli/blob/master/docs/gui ...