Changeset 6f0e814 for docs

Timestamp:
Oct 31, 2012, 9:15:00 AM (13 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, space-access, stable, stage
Children:
5f1eaa3
Parents:
9882429
git-author:
Alex Dehnert <adehnert@…> (10/31/12 09:15:00)
git-committer:
Alex Dehnert <adehnert@…> (10/31/12 09:15:00)
Message:

Only create initial revisions for certain models

In a1ff79acdb702ef5c772fee64d7d590c20ce872a, we added a call to
"call_command('createinitialrevisions', 'groups', )" from
groups/migrations/0019_initial_revs.py. At the time, this worked fine.

In 7ef71434d4c2b3c956ac3ddbfbc4d9701dc5ae38, we added the GroupConstitution?
model (and associated migration groups/migrations/0020_constitutions.py). This
continued to work fine.

In 5f07d507a34af8380a1d12348a9019657640877f, we marked GroupConstitution? as
tracked by reversion. This, too, mostly worked fine. As long as you ran
./manage.py migrate between applying a1ff79ac and this commit, you were set;
given that this is about a nine month interval (with half a dozen migrations
added in the interim), this didn't actually break anything immediately.

Unfortunately, if you didn't run ./manage.py migrate in the interim,
groups:0019_initial_revs would try to create the GroupConstitution? revisions,
but GroupConstitution? would not yet exist. Predictably, this goes poorly.

Compounding the issue, there is one ~common case that will result in this sort
of migration application timing: setting up a new instance of the ASA DB
(presumably for development) will apply all the migrations in one go.

By changing groups:0019_initial_revs to specify the models that need to have
initial revisions, this no longer blocks initing a new DB. I've verified that
no other migrations run createinitialrevisions. (Fixes ASA-#73.)

(No files)

Note: See TracChangeset for help on using the changeset viewer.