mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2025-06-29 00:35:45 +08:00
Moved subject course associative entity to subjects app
This commit is contained in:
parent
8d9364274c
commit
ba7e79cdc2
8 changed files with 86 additions and 16 deletions
|
@ -0,0 +1,28 @@
|
|||
# Generated by Django 4.2.3 on 2023-07-10 09:34
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('courses', '0003_remove_subjectcourse_course_and_more'),
|
||||
('subjects', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
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')),
|
||||
('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='subjects.subject')),
|
||||
],
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='subject',
|
||||
name='courses',
|
||||
field=models.ManyToManyField(related_name='SubjectCourse_subject', through='subjects.SubjectCourse', to='courses.course'),
|
||||
),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue