2023-08-06 14:19:55 +08:00
|
|
|
# Generated by Django 4.2.3 on 2023-08-06 05:55
|
2023-06-27 18:15:31 +08:00
|
|
|
|
2023-07-09 19:00:47 +08:00
|
|
|
from django.conf import settings
|
2023-06-27 18:15:31 +08:00
|
|
|
from django.db import migrations, models
|
|
|
|
import django.db.models.deletion
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
initial = True
|
|
|
|
|
|
|
|
dependencies = [
|
2023-08-06 14:19:55 +08:00
|
|
|
('semesters', '0001_initial'),
|
2023-07-26 12:14:19 +08:00
|
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
2023-07-26 23:32:03 +08:00
|
|
|
('courses', '0001_initial'),
|
|
|
|
('year_levels', '0001_initial'),
|
2023-06-27 18:15:31 +08:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='Subject',
|
|
|
|
fields=[
|
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
2023-07-26 23:32:03 +08:00
|
|
|
('name', models.CharField(max_length=64)),
|
2023-08-06 14:19:55 +08:00
|
|
|
('code', models.CharField(max_length=16)),
|
2023-07-26 12:14:19 +08:00
|
|
|
('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='courses.course')),
|
2023-07-18 15:51:06 +08:00
|
|
|
('semester', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='semesters.semester')),
|
2023-07-26 12:14:19 +08:00
|
|
|
('students', models.ManyToManyField(blank=True, to=settings.AUTH_USER_MODEL)),
|
|
|
|
('year_level', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='year_levels.year_level')),
|
2023-07-18 15:51:06 +08:00
|
|
|
],
|
2023-08-06 14:19:55 +08:00
|
|
|
options={
|
|
|
|
'unique_together': {('name', 'course', 'year_level', 'semester')},
|
|
|
|
},
|
2023-07-18 15:51:06 +08:00
|
|
|
),
|
2023-06-27 18:15:31 +08:00
|
|
|
]
|