redo migrations completely

This commit is contained in:
Thomas Steen Rasmussen 2017-08-19 21:33:13 +02:00
parent b49ecb87b0
commit 410905f3ce
4 changed files with 17 additions and 154 deletions

View file

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-08-17 14:22 # Generated by Django 1.10.5 on 2017-08-19 19:32
from __future__ import unicode_literals from __future__ import unicode_literals
from django.db import migrations, models from django.db import migrations, models

View file

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-08-17 14:22 # Generated by Django 1.10.5 on 2017-08-19 19:32
from __future__ import unicode_literals from __future__ import unicode_literals
from django.db import migrations, models from django.db import migrations, models
@ -13,17 +13,23 @@ class Migration(migrations.Migration):
dependencies = [ dependencies = [
('shop', '0047_auto_20170522_1942'), ('shop', '0047_auto_20170522_1942'),
('camps', '0022_camp_colour'),
('sponsors', '0006_auto_20170715_1110'), ('sponsors', '0006_auto_20170715_1110'),
('camps', '0022_camp_colour'),
] ]
operations = [ operations = [
migrations.CreateModel( migrations.CreateModel(
name='BaseTicket', name='BaseTicket',
fields=[ fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True)),
('updated', models.DateTimeField(auto_now=True)),
('qrcode_base64', models.TextField(blank=True, null=True)), ('qrcode_base64', models.TextField(blank=True, null=True)),
('checked_in', models.BooleanField(default=False)),
], ],
options={
'abstract': False,
},
), ),
migrations.CreateModel( migrations.CreateModel(
name='TicketType', name='TicketType',
@ -32,6 +38,7 @@ class Migration(migrations.Migration):
('created', models.DateTimeField(auto_now_add=True)), ('created', models.DateTimeField(auto_now_add=True)),
('updated', models.DateTimeField(auto_now=True)), ('updated', models.DateTimeField(auto_now=True)),
('name', models.TextField()), ('name', models.TextField()),
('camp', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='camps.Camp')),
], ],
options={ options={
'abstract': False, 'abstract': False,
@ -40,53 +47,38 @@ class Migration(migrations.Migration):
migrations.CreateModel( migrations.CreateModel(
name='DiscountTicket', name='DiscountTicket',
fields=[ fields=[
('baseticket_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, to='tickets.BaseTicket')), ('baseticket_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='tickets.BaseTicket')),
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True)),
('updated', models.DateTimeField(auto_now=True)),
('price', models.IntegerField(help_text='Price of the discounted ticket (in DKK, including VAT).')), ('price', models.IntegerField(help_text='Price of the discounted ticket (in DKK, including VAT).')),
], ],
options={ options={
'abstract': False, 'abstract': False,
}, },
bases=('tickets.baseticket', models.Model), bases=('tickets.baseticket',),
), ),
migrations.CreateModel( migrations.CreateModel(
name='ShopTicket', name='ShopTicket',
fields=[ fields=[
('baseticket_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, to='tickets.BaseTicket')), ('baseticket_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='tickets.BaseTicket')),
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True)),
('updated', models.DateTimeField(auto_now=True)),
('name', models.CharField(blank=True, help_text='Name of the person this ticket belongs to. This can be different from the buying user.', max_length=100, null=True)), ('name', models.CharField(blank=True, help_text='Name of the person this ticket belongs to. This can be different from the buying user.', max_length=100, null=True)),
('email', models.EmailField(blank=True, max_length=254, null=True)), ('email', models.EmailField(blank=True, max_length=254, null=True)),
('checked_in', models.BooleanField(default=False)),
('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='shoptickets', to='shop.Order')), ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='shoptickets', to='shop.Order')),
('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shop.Product')), ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shop.Product')),
], ],
options={ options={
'abstract': False, 'abstract': False,
}, },
bases=('tickets.baseticket', models.Model), bases=('tickets.baseticket',),
), ),
migrations.CreateModel( migrations.CreateModel(
name='SponsorTicket', name='SponsorTicket',
fields=[ fields=[
('baseticket_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, to='tickets.BaseTicket')), ('baseticket_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='tickets.BaseTicket')),
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True)),
('updated', models.DateTimeField(auto_now=True)),
('sponsor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sponsors.Sponsor')), ('sponsor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sponsors.Sponsor')),
], ],
options={ options={
'abstract': False, 'abstract': False,
}, },
bases=('tickets.baseticket', models.Model), bases=('tickets.baseticket',),
),
migrations.AddField(
model_name='baseticket',
name='camp',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='camps.Camp'),
), ),
migrations.AddField( migrations.AddField(
model_name='baseticket', model_name='baseticket',

View file

@ -1,108 +0,0 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-08-19 19:26
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import uuid
class Migration(migrations.Migration):
dependencies = [
('camps', '0022_camp_colour'),
('tickets', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='baseticket',
name='camp',
),
migrations.RemoveField(
model_name='baseticket',
name='id',
),
migrations.RemoveField(
model_name='discountticket',
name='created',
),
migrations.RemoveField(
model_name='discountticket',
name='updated',
),
migrations.RemoveField(
model_name='discountticket',
name='uuid',
),
migrations.RemoveField(
model_name='shopticket',
name='checked_in',
),
migrations.RemoveField(
model_name='shopticket',
name='created',
),
migrations.RemoveField(
model_name='shopticket',
name='updated',
),
migrations.RemoveField(
model_name='shopticket',
name='uuid',
),
migrations.RemoveField(
model_name='sponsorticket',
name='created',
),
migrations.RemoveField(
model_name='sponsorticket',
name='updated',
),
migrations.RemoveField(
model_name='sponsorticket',
name='uuid',
),
migrations.AddField(
model_name='baseticket',
name='checked_in',
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name='baseticket',
name='created',
field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now),
preserve_default=False,
),
migrations.AddField(
model_name='baseticket',
name='updated',
field=models.DateTimeField(auto_now=True),
),
migrations.AddField(
model_name='baseticket',
name='uuid',
field=models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False),
),
migrations.AddField(
model_name='tickettype',
name='camp',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='camps.Camp'),
),
migrations.AlterField(
model_name='discountticket',
name='baseticket_ptr',
field=models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='tickets.BaseTicket'),
),
migrations.AlterField(
model_name='shopticket',
name='baseticket_ptr',
field=models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='tickets.BaseTicket'),
),
migrations.AlterField(
model_name='sponsorticket',
name='baseticket_ptr',
field=models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='tickets.BaseTicket'),
),
]

View file

@ -1,21 +0,0 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-08-19 19:26
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('tickets', '0002_auto_20170819_2126'),
]
operations = [
migrations.AlterField(
model_name='tickettype',
name='camp',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='camps.Camp'),
),
]