About Renaming Fields In Migrations
When you rename a model field including its verbose name, automatic migrations suggest to remove the old field and add a new one.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
You can manually change that to the rename and alter operations to preserve the data that is already entered:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
Tips and Tricks Programming Architecture Django 4.2 Django 3.2 Django 2.2
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django GDPR Cookie Consent app
For Django websites that use cookies.