I wanted to go party but migrations were fucked

This commit is contained in:
Midgard 2020-07-22 04:18:57 +02:00
parent 343edb2bdf
commit 29202a528a
Signed by: midgard
GPG key ID: 511C112F1331BBB4
5 changed files with 57 additions and 43 deletions

View file

@ -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')),
],
),
]

View file

@ -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',
),
]

View file

@ -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),
),
]

View file

@ -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)),

View file

@ -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),
),
]