After adding to the database fields, for example in products:
1) Add a field to a table
2) write code in the place where you want to add
3) enter information in the locale
4)After that, you need to do:
- python manage.py schemamigration
- python manage.py migrate
Data will remain in place and will simply update the table,right ?
You don't have tables, you have models and objects.
Add the field to the model. There are two possible options:
1) the Field NULLable or with default value. Nothing else to do.
2) the Other case - you need to specify the field value to all already created objects.
In any case, do
If your case is the second, specify a value, then