site_tps/users/migrations/0001_initial.py

34 lines
1.2 KiB
Python
Raw Normal View History

2018-02-28 20:25:44 +00:00
# Generated by Django 2.0.1 on 2018-02-28 18:43
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
2018-02-28 14:06:55 +00:00
('auth', '0009_alter_user_last_name_max_length'),
2018-02-28 20:25:44 +00:00
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='SchoolProfile',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
2018-02-28 20:25:44 +00:00
('group', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='students', to='auth.Group')),
],
),
migrations.CreateModel(
name='UserProfile',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
2018-02-28 14:06:55 +00:00
('school', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='users.SchoolProfile')),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
]