mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2025-06-29 00:35:45 +08:00
Fixed integrity issues with on_delete for customuser
This commit is contained in:
parent
9196bfa602
commit
f6cbe1941e
5 changed files with 58 additions and 4 deletions
|
@ -0,0 +1,20 @@
|
|||
# Generated by Django 4.2.2 on 2023-07-04 10:01
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('subjects', '0002_subjectstudent_subject_students'),
|
||||
('student_status', '0004_alter_studentstatus_study_group'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='studentstatus',
|
||||
name='subject',
|
||||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='subjects.subject'),
|
||||
),
|
||||
]
|
|
@ -11,7 +11,7 @@ class StudentStatus(models.Model):
|
|||
x = models.FloatField(null=True)
|
||||
y = models.FloatField(null=True)
|
||||
subject = models.ForeignKey(
|
||||
'subjects.Subject', on_delete=models.CASCADE, null=True)
|
||||
'subjects.Subject', on_delete=models.SET_NULL, null=True)
|
||||
active = models.BooleanField(default=False)
|
||||
timestamp = models.DateField(auto_now_add=True)
|
||||
study_group = models.ManyToManyField(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue