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

Re: Problem migrating from South to Django migrations for Linux distributions

On 25 July 2014 06:27, Raphael Hertzog <raphael@ouaza.com> wrote:
How can we solve this problem?

This isn't really a good solution, but the best I can think of right now. The system administrator for every site does the following:

1. Manually pins python-django to less then 1.7 - can somebody please check?

Package: python-django
Pin: version 1.7.*
Pin-Priority: 50

(is priority 50 appropriate? "causes a version to be installed only if there is no installed version of the package")

2. apt-get dist-upgrade. System administrator makes sure that python-django-south is upgraded to 1.0 in the process.

3. Checks that *all* migrations for all applications have been run.

4. Remove the pinning, and upgrade.

For this to work correctly, all packages with migrations must continue to work properly with Django in Wheezy, which in Django 1.4.5. As in the package doesn't need to be fully functional, it does need to be installable, and the migrations must run ok. If the package does work properly this will minimize downtime.

I can't help but think this might be unrealistic (?). Changes required for new versions of Django often break compatibility with old versions, and 1.4.5 is really old now. Just because many packages don't have versioned dependencies on Django (or a versioned dependency on a really old version) doesn't necessarily mean they will work with any 1.4.5. Anyone want to test every Django package in Debian sid against the Django in wheezy?

So we might need to supply Django 1.6 somewhere (doesn't need to be in the archive) as a "stepping stone" to manually install (before?) then apt-get dist-upgrade in order to allow the packages to install correctly and the migrations to run. Obviously this means packages need to work with Django 1.6 and 1.7, that is a lot easier then trying to support 1.4.5 and 1.7 however.

Nothing here is final or official or anything, still trying to think this process through.

If there are no migrations, there is no problem, the user can upgrade everything in one go. In a practical sense, I think the most likely problem will be locally installed Django apps that are not part of Debian [need some sort of evidence to back up this claim].

(as an aside, I have users of my Django app who are still running a really old version on Debian squeeze :-( ).
Brian May <brian@microcomaustralia.com.au>

Reply to: