spaceout/site/api/migrations/0001_initial.py
2020-12-12 17:52:44 -05:00

37 lines
1.4 KiB
Python

# Generated by Django 3.1.4 on 2020-12-12 22:37
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.db.models.fields
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Profile',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('profile_pic', models.ImageField(default='default.jpg', upload_to='profile_pics')),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Classroom',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=30)),
('teacher', models.CharField(max_length=30)),
('period', models.CharField(blank=True, max_length=1, unique=True, verbose_name=django.db.models.fields.PositiveIntegerField)),
('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.profile')),
],
),
]