mirror of
https://github.com/nanoy42/coope
synced 2024-10-31 23:22:50 +00:00
56 lines
2.2 KiB
Python
56 lines
2.2 KiB
Python
|
# Generated by Django 2.1 on 2018-08-31 12:45
|
||
|
|
||
|
from django.conf import settings
|
||
|
from django.db import migrations, models
|
||
|
import django.db.models.deletion
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
initial = True
|
||
|
|
||
|
dependencies = [
|
||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||
|
('preferences', '0001_initial'),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.CreateModel(
|
||
|
name='Cotisation',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('amount', models.DecimalField(decimal_places=2, max_digits=5)),
|
||
|
('paymentDate', models.DateTimeField(auto_now_add=True)),
|
||
|
('endDate', models.DateTimeField()),
|
||
|
('paymentMethod', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='preferences.PaymentMethod')),
|
||
|
('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
|
||
|
],
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='Profile',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('credit', models.DecimalField(decimal_places=2, default=0, max_digits=5)),
|
||
|
('debit', models.DecimalField(decimal_places=2, default=0, max_digits=5)),
|
||
|
('cotisationEnd', models.DateTimeField(blank=True, null=True)),
|
||
|
],
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='School',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('name', models.CharField(max_length=255)),
|
||
|
],
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='profile',
|
||
|
name='school',
|
||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='users.School'),
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='profile',
|
||
|
name='user',
|
||
|
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
|
||
|
),
|
||
|
]
|