+ 7
How i can add new fields into models when Django project in the production environment.
My Django website has been live on digital ocean server from last 4 months. I need to add a new field into my models. How I can add that. Should new fields be added when your project in a production environment? I'm using PostgreSQL database. Nginx web server and using gunicorn.
1 Réponse
+ 3
Maninder $ingh
If you want to add the field in live production environment I would suggest trying with installing "South" and fake the migration with adding new field.
You can test it once here are some links which is stating to do the desired thing with faking the migration.
▶ https://stackoverflow.com/questions/22275083/add-field-to-existing-django-app-in-production-environment
▶ https://medium.com/swlh/production-ready-method-of-extending-django-user-model-in-mid-project-3afa174b000b
▶ https://stackoverflow.com/questions/22697202/django-1-5-how-do-i-add-a-new-model-field-to-an-existing-table-using-south-with/22697396