[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help needed to test packages with Django 1.7



On 23 July 2014 15:58, Brian May <brian@microcomaustralia.com.au> wrote:
You are expected to do all database migrations with Django 1.6, then upgrade to Django 1.7

Some more thoughts.

Are there any packages in Debian that attempt to automatically do database migrations on upgrade?

If, not, that is good. Will solve the problem with my own package on my own, it isn't in Debian.

However, if there are, we need to be able to disable this functionality until the system administrator has manually confirmed that all Django South migrations have been run. 

Was thinking of having some sort of flag file that is created to confirm it is safe to run Django 1.7 migrations. I picture this to be something like (not tested) the following - maybe this could be scripted?

virtualenv --system-site-packages ~/old_django
. ~/old_django/bin/activate
pip install django==1.6.5
pip install django-south
django-admin --settings=??? migrate --all
touch /etc/xyz/south_migrations_complete
deactivate
rm -rf ~/old_django

Don't particularly like using --system-site-packages, think it will be required to find the application however. Hopefully it will still get the correct version of Django in this case.

Obviously, if this is scripted, you would use a temp directory, not ~/old_django.
--
Brian May <brian@microcomaustralia.com.au>

Reply to: