mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2025-06-28 16:25:44 +08:00
Removed associative entity between student and subject
This commit is contained in:
parent
8a42b58f87
commit
e6c4dd7b9c
27 changed files with 82 additions and 264 deletions
|
@ -1,7 +1,6 @@
|
|||
# Generated by Django 4.2.3 on 2023-07-09 10:57
|
||||
# Generated by Django 4.2.3 on 2023-07-18 07:43
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
@ -20,11 +19,4 @@ class Migration(migrations.Migration):
|
|||
('shortname', models.CharField(max_length=16)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='SubjectCourse',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('course', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='courses.course')),
|
||||
],
|
||||
),
|
||||
]
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# Generated by Django 4.2.3 on 2023-07-09 10:57
|
||||
# Generated by Django 4.2.3 on 2023-07-18 07:43
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
@ -14,14 +13,9 @@ class Migration(migrations.Migration):
|
|||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='subjectcourse',
|
||||
name='subject',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='subjects.subject'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='course',
|
||||
name='subjects',
|
||||
field=models.ManyToManyField(related_name='SubjectCourse_course', through='courses.SubjectCourse', to='subjects.subject'),
|
||||
field=models.ManyToManyField(related_name='SubjectCourse_course', through='subjects.SubjectCourse', to='subjects.subject'),
|
||||
),
|
||||
]
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
# Generated by Django 4.2.3 on 2023-07-10 09:34
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('courses', '0002_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='subjectcourse',
|
||||
name='course',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='subjectcourse',
|
||||
name='subject',
|
||||
),
|
||||
]
|
|
@ -1,22 +0,0 @@
|
|||
# Generated by Django 4.2.3 on 2023-07-10 09:34
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('subjects', '0002_subjectcourse_alter_subject_courses'),
|
||||
('courses', '0003_remove_subjectcourse_course_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='course',
|
||||
name='subjects',
|
||||
field=models.ManyToManyField(related_name='SubjectCourse_course', through='subjects.SubjectCourse', to='subjects.subject'),
|
||||
),
|
||||
migrations.DeleteModel(
|
||||
name='SubjectCourse',
|
||||
),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue