Maik Hoepfel
9fa2589b6c
Change type and name of basket field on AbstractOrder
It used to be a PositiveIntegerField containing the primary key of the
basket. This was a minor design deficiency; a nullable ForeignKey field
seems like the correct way to model that relation.
It's also been renamed from basket_id to basket to reflect the change.
Migrations unfortunately are non-trivial:
* 0019 adds the new ForeignKey field, but called basket_alt
* 0020 migrates data from the old field to the new field
* 0021 drops the now unnecessary field basket_id
* 0022 renames the basket_alt field to basket
The additional step with naming it basket_alt is necessary because of a
column name conflict. Django will pick a column name of 'basket_id' for
a ForeignKey field named 'basket', which is the same column name the
old PositiveIntegerField had.
Fixes #912