annuaire-eleves/fiches/migrations/0001_initial.py
2019-02-18 21:52:07 +01:00

60 lines
3 KiB
Python

# Generated by Django 2.2b1 on 2019-02-18 20:46
from django.conf import settings
import django.core.validators
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),
]
operations = [
migrations.CreateModel(
name='Department',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=1023, verbose_name='nom du département')),
],
),
migrations.CreateModel(
name='Profile',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('full_name', models.CharField(max_length=1023, verbose_name='nom')),
('nickname', models.CharField(max_length=1023, verbose_name='surnom')),
('picture', models.ImageField(upload_to='picture', verbose_name='photo')),
('promotion', models.IntegerField(validators=[django.core.validators.MinValueValidator(1980)], verbose_name='promotion')),
('birth_date', models.DateField(verbose_name='date de naissance')),
('thurne', models.CharField(max_length=100, verbose_name='thurne')),
('text_field', models.TextField(verbose_name='champ libre')),
('printing', models.BooleanField(verbose_name="apparaître sur l'annuaire papier ?")),
('keep_me', models.BooleanField(verbose_name='conserver la fiche annuaire ?')),
('department', models.ManyToManyField(to='fiches.Department', verbose_name='département')),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='utilisateur')),
],
),
migrations.CreateModel(
name='Social',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=1023, verbose_name='type')),
('content', models.CharField(max_length=1023, verbose_name='contenu')),
('profile', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='fiches.Profile', verbose_name='profil')),
],
),
migrations.CreateModel(
name='Phone',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=1023, verbose_name='type')),
('number', models.CharField(max_length=1023, verbose_name='numéro')),
('profile', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='fiches.Profile', verbose_name='profil')),
],
),
]