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

后端 未结 11 448
北恋
北恋 2021-01-31 02:37

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 err

11条回答
  •  后悔当初
    2021-01-31 03:18

    Django 2.1

    I encountered this problem while switching from sqlite3 to postgresql. Remove the migration files in each app's migrations folder except __init__.py Then re-run migration

    (venv)myapp$python manage.py makemigrations
    (venv)myapp$python manage.py migrate
    (venv)myapp$python manage.py runserver
    

提交回复
热议问题