Django fixture fails, stating “DatabaseError: value too long for type character varying(50)”

前端 未结 6 1054
时光取名叫无心
时光取名叫无心 2020-12-05 19:57

I have a fixture (json) which loads in development environment but fails to do so in server environment. The error says: \"DatabaseError: value too long for type chara

6条回答
  •  隐瞒了意图╮
    2020-12-05 20:19

    Just for information : I also had this error

    DatabaseError: value too long for type character varying(10)
    

    It seems that I was writing data over the limit of 10 for a field. I fixed it by increasing the size of a CharField from 10 to 20

    I hope it helps

提交回复
热议问题