mirror of
https://github.com/nanoy42/coope
synced 2024-11-22 19:33:11 +00:00
42 lines
1.5 KiB
Python
42 lines
1.5 KiB
Python
# Generated by Django 2.1 on 2019-06-23 07:57
|
|
|
|
from django.db import migrations, models
|
|
|
|
def update(apps, schema_editor):
|
|
CotisationHistory = apps.get_model('users', 'CotisationHistory')
|
|
for cotisation_history in CotisationHistory.objects.all():
|
|
cotisation_history.amount_ptm = cotisation_history.cotisation.amount_ptm
|
|
cotisation_history.save()
|
|
|
|
def reverse_update(apps, schema_editor):
|
|
pass
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('users', '0006_auto_20190611_0105'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AddField(
|
|
model_name='cotisationhistory',
|
|
name='amount_ptm',
|
|
field=models.DecimalField(decimal_places=2, max_digits=5, null=True, verbose_name='Montant pour le club Phœnix Technopôle Metz'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='cotisationhistory',
|
|
name='divided',
|
|
field=models.BooleanField(default=False, verbose_name='Répartition'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='historicalcotisationhistory',
|
|
name='amount_ptm',
|
|
field=models.DecimalField(decimal_places=2, max_digits=5, null=True, verbose_name='Montant pour le club Phœnix Technopôle Metz'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='historicalcotisationhistory',
|
|
name='divided',
|
|
field=models.BooleanField(default=False, verbose_name='Répartition'),
|
|
),
|
|
migrations.RunPython(update, reverse_update)
|
|
]
|