- Fix some issues and improve efficiency of some RunPython code in
migrations.
- Merge some migrations.
- To simplify, any RunPython don't get a revert function.
Run 'bash provisioning/check_migrations_supportBDS.sh' from the vagrant
VM.
This will do the following:
- delete the existing database 'cof_gestion', if applicable,
- apply migrations to render the database as pre-supportBDS,
- the last pre-supportBDS migration of 'cof' app creates some instances
using old database schema,
- supportBDS migrations are applied,
- finally, the 'check_olddata' command of 'cof' app ensures data has
been correctly migrated.
This commit should be reverted before reaching production stage.
BDS + COF
The permissions assignation is triggered by the `post_migrate` signal since the
permission table will only be populated after the migrations have been applied.
- The models are moved to the `gestion` app
- A new field `associations` is added
- The location and datetime fields are removed in favour of a new model
`EventTimeSlot`
- The old events are migrated to the new app and linked to the
`cof_buro` association
- Move the model
- Add some BDS-related fields
- Add an `associations` fields to be able to separate the clubs between
the different associations using groups
- remove is_buro from the database in the same way we did for is_cof
- make a decent migration that *SHOULD* take into account is_cof for old
databases. note, this has been tested only through unittests.
- make unittests pass again accordin=gly fixing views.
Note: we should make a method for filtering with specific group members,
something like
map(lambda x: x.profile.cof, filter… group…)