mirror of
https://github.com/lemeow125/InfoTech-Backend.git
synced 2024-11-17 06:29:26 +08:00
46 lines
2 KiB
Python
46 lines
2 KiB
Python
# Generated by Django 4.2 on 2023-04-22 02:49
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import django.utils.timezone
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
('subjects', '0006_remove_subject_students'),
|
|
('professors', '0001_initial'),
|
|
('students', '0004_student_enrolled_subjects'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Schedule',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('date_created', models.DateTimeField(default=django.utils.timezone.now, editable=False)),
|
|
('professor', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='Professor_last_name', to='professors.professor')),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='StudentSchedule',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('date_joined', models.DateTimeField(default=django.utils.timezone.now, editable=False)),
|
|
('schedule', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='schedules.schedule')),
|
|
('student_assigned', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='students.student')),
|
|
],
|
|
),
|
|
migrations.AddField(
|
|
model_name='schedule',
|
|
name='students_assigned',
|
|
field=models.ManyToManyField(related_name='StudentSchedule_student_assigned', through='schedules.StudentSchedule', to='students.student'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='schedule',
|
|
name='subject',
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='subjects.subject'),
|
|
),
|
|
]
|