Migrating from 1.3 to 1.3.1¶
Changes¶
- Initial South database migration setup. Makes no changes to our database tables, but it adds tables for South migration history.
- Increased the timeout of gunicorn from 30 to 180 sec. This should avoid timeouts on huge courses for really heavy operations like manually adding all students.
Backup database and files¶
BACKUP. YOUR. DATABASE. AND. FILES.
Update devilry¶
1 — Remove the Python Egg cache¶
For the fix to #444 to work, you have to clear the Python Egg cache. This should not cause any problems, but we will take a backup to be on the safe side.
Locate your buildout cache. If you followed the install guide, it should be in
/path/to/devilrybuild/buildoutcache/eggs/
.Move the cache to a safe location:
$ mv /path/to/devilrybuild/buildoutcache/eggs /my/safe/stash/ $ mkdir /path/to/devilrybuild/buildoutcache/eggs
Make sure to check that buildoutcache/eggs/
is not empty after step 2
(below). If eggs/
is empty, you found the wrong buildoutcache directory,
and you have to repeat steps 1 and 2.
Note
You will probably get a lot of Fortran warnings/errormessages when you run buildout in the next step. This is because the numpy library tries to build stuff with fortran support. This is not a problem for Devilry - we do not use any of the sub-modules that need Fortran.
2 — Update to v1.3 step 1-3¶
Update REVISION
to v1.3.1
using the instructions in the update guide,
but stop after step 3 (do not restart supervisord).
3 — Apply the initial South migrations¶
Run the following commands to add the new South database tables, and fake the migrations to the current database state:
$ cd /path/to/devilrybuild
$ bin/django.py syncdb
$ bin/django.py migrate core 0001 --fake
$ bin/django.py migrate devilry_qualifiesforexam 0001 --fake
$ bin/django.py migrate devilry_qualifiesforexam_points 0001 --fake
$ bin/django.py migrate devilry_qualifiesforexam_approved 0001 --fake
Note
We need to fake the migrations because we did not use South when the database was intially created. You can read more about South initial in their docs.
4 — Restart the servers¶
Restart the appservers as explained in step 4 in the update guide.