Commit graph

21 commits

Author SHA1 Message Date
Martin Pépin c3d465d75a Clipper ≤ 8 chars in cof.migrations.0008_py3 2017-10-30 15:25:14 +01:00
Aurélien Delobelle 09a88f768d Fix username conflicts with test suite and the…
…check_supportBDS_migrations script.
2017-10-28 18:08:40 +02:00
Aurélien Delobelle 09a96a0375 Fix postgres sequences
When manually assigning a value to AutoField, sequences must be updated
manually.

https://docs.djangoproject.com/en/1.11/ref/databases/#manually-specifying-values-of-auto-incrementing-primary-keys
2017-10-28 17:30:37 +02:00
Martin Pépin 9409b55df5 Merge migrations from master and supportBDS
- Add missing migrations
- Fix dependencies
- rename gestioncof -> cof
2017-10-26 11:06:17 +02:00
Aurélien Delobelle 5d572b3603 Clean supportBDS migrations.
- 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.
2017-09-05 14:41:13 +02:00
Aurélien Delobelle 131c45e1c7 Add tests to check data migrations of supportBDS.
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.
2017-09-05 14:16:59 +02:00
Martin Pépin e578aef74d Fix circular deps in the migrations 2017-08-06 18:28:07 +01:00
Martin Pépin b68590ffd7 Set the permissions for buro and members
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.
2017-06-24 23:45:04 +01:00
Martin Pépin c217b549bd Move the events stuff to gestion
- 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
2017-04-01 14:25:48 +01:00
Martin Pépin 5ce4809f06 Merge branch 'supportBDS' into Kerl/bds_groups 2017-02-23 12:58:10 +01:00
Martin Pépin 7988fb24a0 Merge branch 'supportBDS' into Kerl/clubs_support 2017-02-23 12:35:37 +01:00
Martin Pépin 213c11721e Prevent petits cours demandes deletion 2017-02-23 11:03:28 +01:00
Martin Pépin 9f401b66e9 Specify the on_delete attribute everywhere
- Models
- Migrations
2017-02-23 01:40:25 +01:00
Martin Pépin c81b849785 Prevent conflicts in COF perm migration
There may be a conflict during the migration cof 0009 if the permissions
are referenced only by their codename.
2017-02-22 18:21:23 +01:00
Martin Pépin 669129e30d Move the club model to the gestion app
- 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
2017-02-20 01:12:06 +01:00
Martin Pépin 52bdd9824a Merge branch 'supportBDS' of git.eleves.ens.fr:michele.orru/gestioCOF into michele 2017-02-18 13:00:21 +01:00
Martin Pépin 7f5132961f Add the cof_members group
GestioCOF cannot run without it.
There is no permission associated to it: this has to been thought about
2017-02-12 19:49:30 +01:00
Michele Orrù 94937fc7cd Add groups cof_members and cof_buro.
- 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…)
2017-02-11 23:05:51 +01:00
Qwann b5037329dd small fixes + migration
enable admin interface for bds
2017-02-11 20:36:16 +01:00
Ubuntu f39d1545f0 Generic profiles and migrations.
Creating profiles for BDS, COF and K-Fêt.
2017-02-10 22:12:03 +01:00
Martin Pépin 5aff771d9c Set the new structure of gestioCOF
- `cof` is renamed `gestioCOF`
- `gestioncof` become `cof` (yes it looks pretty stupid but it is not)
- `bds` is created
2017-02-09 21:28:36 +01:00