Commit 28271ac5 authored by Hamza Dely's avatar Hamza Dely

Réduction de l'ensemble des migrations

parent 9ad1c308
# -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2018-09-07 09:38
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
replaces = [('activites', '0001_initial'), ('activites', '0002_auto_20170609_1940'), ('activites', '0003_auto_20180719_1939'), ('activites', '0004_auto_20180719_1949')]
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Activite',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('intitule', models.CharField(max_length=255, verbose_name='intitulé')),
('description', models.TextField(blank=True)),
('debut', models.DateTimeField(verbose_name='début')),
('fin', models.DateTimeField()),
('liste_invitation', models.BooleanField(default=False, verbose_name="sur liste d'invitation ?")),
],
options={
'default_permissions': [],
'permissions': [('activite_ajouter', 'Ajouter/supprimer une activité'), ('activite_modifier', 'Modifier une activité'), ('activite_gerer', 'Gérer les activités')],
},
),
migrations.CreateModel(
name='Invite',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('nom', models.CharField(max_length=255)),
('prenom', models.CharField(max_length=255, verbose_name='prénom')),
('present', models.NullBooleanField(default=None, verbose_name='présent')),
('activite', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='invites', to='activites.Activite', verbose_name='activité')),
('invite_par', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='invites', to=settings.AUTH_USER_MODEL, verbose_name='invité par')),
('naissance', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date de naissance')),
],
options={
'default_permissions': [],
'permissions': [('invite_inviter', 'Inviter une personne à une activité'), ('invite_supprimer', 'Supprimer un invité')],
},
),
migrations.AddField(
model_name='activite',
name='organisateur',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='activites_organisees', to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='activite',
name='valide_par',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='activites_validees', to=settings.AUTH_USER_MODEL, verbose_name='validé par'),
),
migrations.AlterUniqueTogether(
name='invite',
unique_together=set([('nom', 'prenom', 'naissance', 'activite')]),
),
migrations.AlterUniqueTogether(
name='activite',
unique_together=set([('intitule', 'debut', 'fin')]),
),
migrations.AlterField(
model_name='invite',
name='naissance',
field=models.DateField(verbose_name='date de naissance'),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2018-09-07 09:37
from __future__ import unicode_literals
import comptes.models
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
replaces = [('comptes', '0001_initial'), ('comptes', '0002_auto_20171213_1003'), ('comptes', '0003_auto_20171213_1005'), ('comptes', '0004_auto_20171213_1017'), ('comptes', '0005_auto_20180207_2231'), ('comptes', '0006_auto_20180225_0249')]
initial = True
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
('auth', '0008_alter_user_username_max_length'),
]
operations = [
migrations.CreateModel(
name='Adherent',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('password', models.CharField(max_length=128, verbose_name='password')),
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
('pseudo', models.CharField(max_length=1023, unique=True, validators=[django.core.validators.RegexValidator('^(\\S|\\S+.*\\S+)$')])),
('nom', models.CharField(blank=True, max_length=255)),
('prenom', models.CharField(blank=True, max_length=255, verbose_name='prénom')),
('email', models.EmailField(max_length=254)),
('sexe', models.CharField(blank=True, choices=[(None, 'ND'), ('M', 'M'), ('F', 'F')], default=None, max_length=1, null=True)),
('type', models.CharField(choices=[('personne', 'Personne'), ('club', 'Club'), ('section', 'Section'), ('débit', 'Débit')], default='personne', max_length=255)),
('telephone', models.CharField(blank=True, max_length=50, validators=[django.core.validators.RegexValidator('^[0-9 -]+$')], verbose_name='téléphone')),
('adresse', models.TextField(blank=True, default='')),
('remunere', models.BooleanField(default=False, verbose_name='rémunéré')),
('pbsante', models.TextField(blank=True, default='', verbose_name='problème de santé')),
('remarque', models.TextField(blank=True, default='')),
('uuid', models.UUIDField(default=uuid.uuid4, unique=True)),
('is_staff', models.BooleanField(default=False, verbose_name='membre actif')),
('is_active', models.BooleanField(default=True, verbose_name='compte actif')),
('supprime', models.BooleanField(default=False, verbose_name='compte supprimé')),
('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
],
options={
'permissions': [('adherent_inscrire', 'Inscrire un nouvel adhérent'), ('adherent_detail', "Consulter le profil d'un adhérent"), ('adherent_modifier', "Modifier le profil d'un adhérent"), ('adherent_chercher', 'Chercher parmi les adhérents'), ('adherent_change_pw', 'Changer un mot de passe'), ('adherent_desactiver', "Désactiver le compte d'un adhérent"), ('adherent_supprimer', 'Supprimer un adhérent')],
'verbose_name': 'adhérent',
'default_permissions': [],
},
),
migrations.CreateModel(
name='Accreditation',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('meta', models.BooleanField(default=False, verbose_name='méta-droit')),
('adherent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='accreditations', to=settings.AUTH_USER_MODEL, verbose_name='adhérent')),
],
options={
'default_permissions': [],
},
),
migrations.CreateModel(
name='Adhesion',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('debut', models.DateTimeField(auto_now_add=True, verbose_name='début')),
('fin', models.DateTimeField(blank=True)),
('adherent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='adhesions', to=settings.AUTH_USER_MODEL, verbose_name='adhérent')),
],
options={
'verbose_name': 'adhésion',
'default_permissions': [],
},
),
migrations.CreateModel(
name='Alias',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('alias', models.TextField(unique=True, validators=[django.core.validators.RegexValidator('^__deleted__[0-9]+$', inverse_match=True), django.core.validators.RegexValidator('^(\\S|\\S+.*\\S+)$')], verbose_name='alias')),
('proprietaire', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='aliases', to=settings.AUTH_USER_MODEL, verbose_name='propriétaire')),
],
options={
'permissions': [('alias_adopter', 'Adopter un alias'), ('alias_abandonner', 'Abandonner un alias')],
'default_permissions': [],
},
),
migrations.CreateModel(
name='Droit',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('description', models.CharField(max_length=255, verbose_name='description')),
('codename', models.CharField(max_length=100, verbose_name='nom de code')),
('niveau', models.PositiveIntegerField(choices=[(0, 'LIMITE'), (1, 'BASIQUE'), (2, 'ETENDU'), (255, 'TOTAL')])),
('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType', verbose_name='content type')),
],
options={
'default_permissions': [],
},
),
migrations.CreateModel(
name='Historique',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('date', models.DateTimeField(auto_now_add=True)),
('alias', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='comptes.Alias')),
('precedent', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='aliases_cedes', to=settings.AUTH_USER_MODEL)),
('suivant', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='aliases_acquis', to=settings.AUTH_USER_MODEL)),
],
options={
'default_permissions': [],
},
),
migrations.CreateModel(
name='Section',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('sigle', models.CharField(max_length=255, unique=True, verbose_name='sigle')),
('nom', models.TextField(verbose_name='nom')),
('ferme', models.BooleanField(default=False, verbose_name='fermé')),
],
options={
'default_permissions': [],
},
),
migrations.AddField(
model_name='adhesion',
name='section',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adhesions', to='comptes.Section'),
),
migrations.AddField(
model_name='accreditation',
name='droit',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='accreditations', to='comptes.Droit'),
),
migrations.AddField(
model_name='adherent',
name='droits',
field=models.ManyToManyField(related_name='adherents', through='comptes.Accreditation', to='comptes.Droit'),
),
migrations.AlterUniqueTogether(
name='droit',
unique_together=set([('codename', 'niveau')]),
),
migrations.AlterUniqueTogether(
name='accreditation',
unique_together=set([('droit', 'adherent')]),
),
migrations.RemoveField(
model_name='adherent',
name='groups',
),
migrations.AddField(
model_name='adherent',
name='avatar',
field=models.ImageField(blank=True, default=None, max_length=255, null=True, upload_to=comptes.models.upload_to_avatars),
),
migrations.AlterField(
model_name='adherent',
name='is_superuser',
field=models.BooleanField(default=False, verbose_name='superutilisateur'),
),
migrations.AlterField(
model_name='adherent',
name='pseudo',
field=models.CharField(max_length=1023, unique=True, validators=[django.core.validators.RegexValidator('^#[0-9]+$', inverse_match=True), django.core.validators.RegexValidator('^(\\S|\\S+.*\\S+)$')]),
),
migrations.AlterField(
model_name='alias',
name='alias',
field=models.TextField(unique=True, validators=[django.core.validators.RegexValidator('^__deleted__[0-9]+$', inverse_match=True), django.core.validators.RegexValidator('^#[0-9]+$', inverse_match=True), django.core.validators.RegexValidator('^(\\S|\\S+.*\\S+)$')], verbose_name='alias'),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2018-09-07 09:38
from __future__ import unicode_literals
import consos.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
replaces = [('consos', '0001_initial'), ('consos', '0002_auto_20180823_2147'), ('consos', '0003_auto_20180825_1603')]
initial = True
dependencies = [
('comptes', '0006_auto_20180225_0249'),
]
operations = [
migrations.CreateModel(
name='Bouton',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('etiquette', models.CharField(max_length=255, unique=True)),
('description', models.TextField(blank=True)),
('montant', models.DecimalField(decimal_places=2, max_digits=11)),
('actif', models.BooleanField(default=True)),
('categorie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='consos.Categorie')),
],
options={
'default_permissions': [],
'permissions': [('bouton_ajouter', 'Peut ajouter un bouton'), ('bouton_modifier', 'Peut modifier un bouton'), ('bouton_supprimer', 'Peut supprimer un bouton'), ('bouton_activer', 'Peut activer/désactiver un bouton')],
},
),
migrations.CreateModel(
name='Cotisation',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('adhesion', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='comptes.Adhesion')),
],
options={
'default_permissions': [],
},
),
migrations.CreateModel(
name='Note',
fields=[
('adherent', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL, verbose_name='propriétaire')),
('solde', models.DecimalField(decimal_places=2, default=0.0, max_digits=14)),
('releve_freq', models.DurationField(blank=True, default=None, null=True, validators=[consos.models.releve_freq_validator], verbose_name='fréquence des relevés de consommation')),
('dernier_releve', models.DateTimeField(blank=True, default=None, null=True, verbose_name='dernier relevé de consommation')),
('soft_lock', models.BooleanField(default=False, verbose_name='verrouillé par le propriétaire')),
('hard_lock', models.BooleanField(default=False, verbose_name="verrouillé par l'association")),
],
options={
'default_permissions': [],
'permissions': [('note_ouvrir', "Activer la note d'un adhérent"), ('note_soft_lock', "Protéger la note d'un adhérent"), ('note_hard_lock', "Bloquer la note d'un adhérent")],
},
),
migrations.CreateModel(
name='Transaction',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('date', models.DateTimeField(auto_now_add=True)),
('quantite', models.IntegerField(validators=[consos.models.quantite_minimale], verbose_name='quantité')),
('montant', models.DecimalField(decimal_places=2, max_digits=11)),
('description', models.TextField(blank=True)),
('valide', models.BooleanField(default=True)),
('action', models.CharField(choices=[('vente', 'vente'), ('crédit', 'crédit'), ('retrait', 'retrait'), ('transfert', 'transfert')], max_length=255)),
('categorie', models.CharField(max_length=255)),
('destinataire', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='transactions_recues', to='consos.Note')),
('emetteur', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='transactions_emises', to='consos.Note')),
('moyen', models.CharField(choices=[('note', 'note'), ('chèque', 'chèque'), ('espèces', 'espèces'), ('virement', 'virement'), ('carte bancaire', 'carte bancaire')], max_length=255)),
],
options={
'default_permissions': [],
'permissions': [('transaction_effectuer', 'Peut effectuer des transactions'), ('transaction_devalider', 'Peut valider/dévalider des transactions')],
},
),
migrations.AddField(
model_name='cotisation',
name='transaction',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='consos.Transaction'),
),
migrations.AddField(
model_name='bouton',
name='credite',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='consos.Note'),
),
migrations.AlterField(
model_name='bouton',
name='categorie',
field=models.CharField(max_length=255),
),
migrations.AlterField(
model_name='bouton',
name='etiquette',
field=models.CharField(max_length=255),
),
migrations.AlterUniqueTogether(
name='bouton',
unique_together=set([('etiquette', 'categorie')]),
),
]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment