Click here to Skip to main content
15,498,966 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C:\Users\HP\OneDrive\Desktop\personal_portfolio>python manage.py makemigrations
It is impossible to add a non-nullable field 'description' to project_blog without specifying a default. This is because the database needs something to populate existing rows.
Please select a fix:
 1) Provide a one-off default now (will be set on all existing rows with a null value for this column)
 2) Quit and manually define a default value in models.py.
Select an option:


What I have tried:

C:\Users\HP\OneDrive\Desktop\personal_portfolio>python manage.py makemigrations
It is impossible to add a non-nullable field 'description' to project_blog without specifying a default. This is because the database needs something to populate existing rows.
Please select a fix:
 1) Provide a one-off default now (will be set on all existing rows with a null value for this column)
 2) Quit and manually define a default value in models.py.
Select an option:
Posted
Comments
Richard MacCutchan 4-Sep-22 3:26am    
Do what the error message is telling you, and check your models.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900