mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2025-06-29 00:35:45 +08:00
Removed associative entity and fixed relationship between student status and study group
This commit is contained in:
parent
771300f933
commit
7dc80caee7
23 changed files with 266 additions and 253 deletions
|
@ -1,4 +1,4 @@
|
|||
# Generated by Django 4.2.3 on 2023-09-03 09:32
|
||||
# Generated by Django 4.2.3 on 2023-09-25 13:07
|
||||
|
||||
import django.contrib.gis.db.models.fields
|
||||
from django.db import migrations, models
|
||||
|
@ -10,8 +10,8 @@ class Migration(migrations.Migration):
|
|||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('student_status', '0001_initial'),
|
||||
('subjects', '0001_initial'),
|
||||
('landmarks', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
|
@ -23,20 +23,8 @@ class Migration(migrations.Migration):
|
|||
('location', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)),
|
||||
('active', models.BooleanField(default=False)),
|
||||
('timestamp', models.DateField(auto_now_add=True)),
|
||||
('landmark', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='landmarks.landmark')),
|
||||
('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='subjects.subject')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='StudyGroupMembership',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('study_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='study_groups.studygroup')),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='student_status.studentstatus')),
|
||||
],
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='studygroup',
|
||||
name='users',
|
||||
field=models.ManyToManyField(through='study_groups.StudyGroupMembership', to='student_status.studentstatus'),
|
||||
),
|
||||
]
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
# Generated by Django 4.2.3 on 2023-09-24 10:59
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('landmarks', '0001_initial'),
|
||||
('study_groups', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='studygroup',
|
||||
name='landmark',
|
||||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='landmarks.landmark'),
|
||||
),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue