diff --git a/events/migrations/0001_initial.py b/events/migrations/0001_initial.py new file mode 100644 index 0000000..a1a14dd --- /dev/null +++ b/events/migrations/0001_initial.py @@ -0,0 +1,32 @@ +# Generated by Django 3.0.8 on 2020-07-22 02:18 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Event', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('date', models.DateField()), + ('time', models.IntegerField(choices=[(0, 'Voormiddag'), (1, 'Namiddag'), (2, 'Avond')], default=0)), + ('capacity', models.IntegerField(default=6)), + ], + ), + migrations.CreateModel( + name='EventRegistration', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('state', models.CharField(choices=[('I', 'Interested'), ('A', 'Admitted'), ('D', 'Denied')], max_length=1)), + ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='events.Event')), + ], + ), + ] diff --git a/events/migrations/0002_auto_20200722_0101.py b/events/migrations/0002_auto_20200722_0101.py deleted file mode 100644 index ab3ddbc..0000000 --- a/events/migrations/0002_auto_20200722_0101.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 3.0.8 on 2020-07-22 01:01 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('events', '0001_initial'), - ] - - operations = [ - migrations.RenameField( - model_name='eventregistration', - old_name='event_id', - new_name='event', - ), - migrations.RenameField( - model_name='eventregistration', - old_name='user_id', - new_name='user', - ), - ] diff --git a/events/migrations/0002_eventregistration_user.py b/events/migrations/0002_eventregistration_user.py new file mode 100644 index 0000000..005ac0a --- /dev/null +++ b/events/migrations/0002_eventregistration_user.py @@ -0,0 +1,23 @@ +# Generated by Django 3.0.8 on 2020-07-22 02:18 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('events', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='eventregistration', + name='user', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + ] diff --git a/users/migrations/0001_initial.py b/users/migrations/0001_initial.py index b68ad10..a5be237 100644 --- a/users/migrations/0001_initial.py +++ b/users/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 3.0.8 on 2020-07-21 22:48 +# Generated by Django 3.0.8 on 2020-07-22 02:18 from django.db import migrations, models import django.utils.timezone @@ -20,7 +20,7 @@ class Migration(migrations.Migration): ('password', models.CharField(max_length=128, verbose_name='password')), ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), - ('zeus_id', models.IntegerField()), + ('zeus_id', models.IntegerField(null=True, unique=True)), ('is_staff', models.BooleanField(default=False)), ('username', models.CharField(max_length=50, unique=True)), ('student_number', models.CharField(max_length=255)), diff --git a/users/migrations/0002_auto_20200721_2249.py b/users/migrations/0002_auto_20200721_2249.py deleted file mode 100644 index 2d53721..0000000 --- a/users/migrations/0002_auto_20200721_2249.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.0.8 on 2020-07-21 22:49 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('users', '0001_initial'), - ] - - operations = [ - migrations.AlterField( - model_name='customuser', - name='zeus_id', - field=models.IntegerField(null=True, unique=True), - ), - ]