On 10/02/2018 09:42 AM, martin_x wrote:
Hi there,
Thanks for making Django a great framework for starters :D
Recently my team have run into problems when trying to remove a database
column from the model without stopping our Django server, below is the
timeline:
There have been processes developed for addressing this, but they're
quite involved.
You need to ensure any field the current running codebase knows about
never disappears. So, the process of removing a field must be spread
across multiple code deployments
The first setting it nullable [or with a "harmless" default] so when the
new code inserts new rows the DBMS doesn't complain.
The next deploy can then drop the field, as Django no longer interacts
with it.
Either way, you're still likely to encounter a full-table exclusive lock
whilst the DBMS rewrites the table to no longer include that field.
Hope this helps some.
--
Curtis
--
You received this message because you are subscribed to the Google Groups "Django
developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/e8a32669-b566-17ee-132e-49e9dff33256%40tinbrain.net.
For more options, visit https://groups.google.com/d/optout.