diff --git a/events/migrations/0001_initial.py b/events/migrations/0001_initial.py index 37689ff..6b91436 100644 --- a/events/migrations/0001_initial.py +++ b/events/migrations/0001_initial.py @@ -1,5 +1,6 @@ -# Generated by Django 3.0.8 on 2020-07-22 16:03 +# Generated by Django 3.0.8 on 2020-07-25 10:14 +from django.conf import settings from django.db import migrations, models import django.db.models.deletion @@ -9,6 +10,7 @@ class Migration(migrations.Migration): initial = True dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ @@ -19,6 +21,8 @@ class Migration(migrations.Migration): ('date', models.DateField()), ('time', models.IntegerField(choices=[(0, 'voormiddag'), (1, 'namiddag'), (2, 'avond')], default=0)), ('capacity', models.IntegerField(default=6)), + ('note', models.TextField(default='', max_length=1024)), + ('responsible_person', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)), ], ), migrations.CreateModel( @@ -27,6 +31,11 @@ class Migration(migrations.Migration): ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('state', models.CharField(choices=[('I', 'op wachtlijst'), ('A', 'bevestigd')], max_length=1)), ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='events.Event')), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), + migrations.AddConstraint( + model_name='eventregistration', + constraint=models.UniqueConstraint(fields=('event', 'user'), name='register_only_once'), + ), ] diff --git a/events/migrations/0002_auto_20200722_1803.py b/events/migrations/0002_auto_20200722_1803.py deleted file mode 100644 index ec96b19..0000000 --- a/events/migrations/0002_auto_20200722_1803.py +++ /dev/null @@ -1,27 +0,0 @@ -# Generated by Django 3.0.8 on 2020-07-22 16:03 - -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), - ), - migrations.AddConstraint( - model_name='eventregistration', - constraint=models.UniqueConstraint(fields=('event', 'user'), name='register_only_once'), - ), - ] diff --git a/events/migrations/0003_event_note.py b/events/migrations/0003_event_note.py deleted file mode 100644 index 2193733..0000000 --- a/events/migrations/0003_event_note.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.0.8 on 2020-07-25 00:32 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('events', '0002_auto_20200722_1803'), - ] - - operations = [ - migrations.AddField( - model_name='event', - name='note', - field=models.TextField(default='', max_length=1024), - ), - ] diff --git a/events/migrations/0004_event_responsible_person.py b/events/migrations/0004_event_responsible_person.py deleted file mode 100644 index 97a007c..0000000 --- a/events/migrations/0004_event_responsible_person.py +++ /dev/null @@ -1,21 +0,0 @@ -# Generated by Django 3.0.8 on 2020-07-25 00:43 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('events', '0003_event_note'), - ] - - operations = [ - migrations.AddField( - model_name='event', - name='responsible_person', - field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL), - ), - ] diff --git a/users/migrations/0001_initial.py b/users/migrations/0001_initial.py index a70aae6..34e1e51 100644 --- a/users/migrations/0001_initial.py +++ b/users/migrations/0001_initial.py @@ -23,8 +23,8 @@ class Migration(migrations.Migration): ('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)), - ('real_name', models.CharField(max_length=100)), + ('student_number', models.CharField(max_length=255, verbose_name='Studentennummer')), + ('real_name', models.CharField(max_length=100, verbose_name='Echte naam')), ('date_joined', models.DateTimeField(default=django.utils.timezone.now)), ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')), ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),