How to put in the DB field right?

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 schemamigration
- python migrate
-./gunicorn stop
./gunicor start

Data will remain in place and will simply update the table,right ?
July 9th 19 at 13:02
1 answer
July 9th 19 at 13:04
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
./ makemigrations
If your case is the second, specify a value, then
./ migrate

Rabotaesh WSGI server.

Find more questions by tags DjangoMySQL