diff --git a/api/migrations/0001_initial.py b/api/migrations/0001_initial.py deleted file mode 100644 index 5606a234..00000000 --- a/api/migrations/0001_initial.py +++ /dev/null @@ -1,102 +0,0 @@ -# Generated by Django 5.0.2 on 2024-03-05 14:15 - -import django.db.models.deletion -from django.conf import settings -from django.db import migrations, models - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ] - - operations = [ - migrations.CreateModel( - name='Groep', - fields=[ - ('group_id', models.AutoField(primary_key=True, serialize=False)), - ], - ), - migrations.CreateModel( - name='Lesgever', - fields=[ - ('lesgever_id', models.AutoField(primary_key=True, serialize=False)), - ('name', models.CharField(max_length=100)), - ('email', models.EmailField(default='email@email.com', max_length=254)), - ('is_admin', models.BooleanField(default=False)), - ], - ), - migrations.CreateModel( - name='Project', - fields=[ - ('project_id', models.AutoField(primary_key=True, serialize=False)), - ('titel', models.CharField(max_length=100)), - ('description', models.TextField()), - ('opgavebestanden', models.FileField(upload_to='opgave/')), - ('deadline', models.DateTimeField(null=True)), - ], - ), - migrations.CreateModel( - name='Indiening', - fields=[ - ('indiening_id', models.AutoField(primary_key=True, serialize=False)), - ('indieningsbestanden', models.FileField(upload_to='uploads/')), - ('tijdstip', models.DateTimeField()), - ('indiener', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.groep')), - ], - ), - migrations.AddField( - model_name='groep', - name='project', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.project'), - ), - migrations.CreateModel( - name='Score', - fields=[ - ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('score', models.SmallIntegerField()), - ('groep', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.groep')), - ('indiening', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.indiening')), - ], - ), - migrations.CreateModel( - name='Student', - fields=[ - ('student_id', models.AutoField(primary_key=True, serialize=False)), - ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.AddField( - model_name='groep', - name='students', - field=models.ManyToManyField(blank=True, related_name='groups_students', to='api.student'), - ), - migrations.CreateModel( - name='Vak', - fields=[ - ('vak_id', models.AutoField(primary_key=True, serialize=False)), - ('name', models.CharField(max_length=100)), - ('projects', models.ManyToManyField(blank=True, related_name='subjects_projects', to='api.project')), - ('students', models.ManyToManyField(blank=True, related_name='subjects_enrolled', to='api.student')), - ('teachers', models.ManyToManyField(related_name='subjects_teachers', to='api.lesgever')), - ], - ), - migrations.AddField( - model_name='student', - name='subjects', - field=models.ManyToManyField(related_name='students_enrolled', to='api.vak'), - ), - migrations.AddField( - model_name='project', - name='vak', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.vak'), - ), - migrations.AddField( - model_name='lesgever', - name='subjects', - field=models.ManyToManyField(blank=True, related_name='lesgevers_enrolled', to='api.vak'), - ), - ]