DatabaseError:值太长,无法更改类型字符(100) [英] DatabaseError: value too long for type character varying(100)
本文介绍了DatabaseError:值太长,无法更改类型字符(100)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个运行着我们几年前在内部建立的小型CMS的Django网站,它使用的是postgresql。保存简单标题和一段文本时,出现以下错误:
I have a Django web site running a mini CMS we've built internally years ago, it's using postgresql. When saving a simple title and a paragraph of text I get the following error:
value too long for type character varying(100)
奇怪的是,没有一个列是变化的(100)它们都是200或250,甚至由于此处提到的重新打开的票证
The weird thing is, not a single column is varying(100) they are all 200 or 250, even the default Django ones have been changed from the 100 to 200 due to a re-opened ticket mentioned here
有人知道这个问题的解决方案吗?
Does anyone know of a solution to this problem?
推荐答案
我敢打赌,您有没有预定义长度的SlugField吗?将其设置为255并迁移
I can bet money you have a SlugField w/o predefined length? Set it to 255 and migrate
这篇关于DatabaseError:值太长,无法更改类型字符(100)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文