Reputation: 1
time to time i am facing "no such a column
" error during django backend, django-admin development. when i face this issue, i cannot solve it. so that;
db.sqllite3
database file in my project location./djangioapp/migrations/
makemigrations
, migrate
and createsuperuser
commands.i face with this error when i make changes on my Model. even more, i updated my model, i run makemigrations and migrate commands and i got this error no such a column
when i try to access /admin in my djnago project.
actually, after making migrations with makemigrations
and migrate
; i see the changes in 0001_initial.py
file but it does not apply in database.
is there any practical solution for "no such a column
" error?
i face with this error when i make changes on my Model. even more, i updated my model, i run makemigrations and migrate commands and i got this error no such a column
when i try to access /admin in my djnago project.
actually, after making migrations with makemigrations
and migrate
; i see the changes in 0001_initial.py
file but it does not apply in database.
Upvotes: 0
Views: 38
Reputation: 3650
Try This commands
- python manage.py makemigrations your_app_name
- python manage.py migrate
- python manage.py runserver
Upvotes: 0