Hi! Could you help me, I have some SQL table in my model.py. But during develop my project I unterstood that I have to add one new row in this table. How can I do it? Is it possible? Or I should delete current table and create new one?
Assuming by “row” you mean “column”, you’ll want to use Django’s migration framework, which can do this for you: https://docs.djangoproject.com/en/3.0/topics/migrations/
2 Likes
Hi!
You edit your models.py and you run “python3 manage.py makemigrations” in terminal, then you can see what a new migration file is created at app/migrations/.
After that, you run “python3 manage.py migrate”, then you can see that the table changes.
1 Like
Thank you everyone for your help! My question is closed.