fix model dependencies
This commit is contained in:
parent
d9d78a969f
commit
64d38dfcd8
31
billard/migrations/0025_auto_20180211_1059.py
Normal file
31
billard/migrations/0025_auto_20180211_1059.py
Normal file
@ -0,0 +1,31 @@
|
||||
# Generated by Django 2.0.2 on 2018-02-11 10:59
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
('billard', '0024_auto_20180210_1105'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='accounting',
|
||||
name='desk',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='billard.Desk',
|
||||
verbose_name='Tisch'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='client',
|
||||
name='location',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='clients',
|
||||
to='billard.Location', verbose_name='Standort'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='desk',
|
||||
name='client',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='desks',
|
||||
to='billard.Client', verbose_name='Client'),
|
||||
),
|
||||
]
|
@ -49,7 +49,7 @@ class Location(models.Model):
|
||||
|
||||
class Client(models.Model):
|
||||
uuid = models.UUIDField(unique=True, default=uuid.uuid4, verbose_name="Identifier")
|
||||
location = models.ForeignKey(Location, related_name="clients", verbose_name="Standort", on_delete=models.DO_NOTHING)
|
||||
location = models.ForeignKey(Location, related_name="clients", verbose_name="Standort", on_delete=models.CASCADE)
|
||||
report_user = models.ForeignKey(User, blank=True, null=True, verbose_name="Reporting Benutzer",
|
||||
related_name='reporting_clients', on_delete=models.DO_NOTHING)
|
||||
|
||||
@ -62,7 +62,7 @@ class Client(models.Model):
|
||||
|
||||
|
||||
class Desk(models.Model):
|
||||
client = models.ForeignKey(Client, verbose_name='Client', related_name='desks', on_delete=models.DO_NOTHING)
|
||||
client = models.ForeignKey(Client, verbose_name='Client', related_name='desks', on_delete=models.CASCADE)
|
||||
desk_no = models.IntegerField(verbose_name='Tischnummer')
|
||||
name = models.CharField(max_length=32, blank=True, null=True, verbose_name='Tischbezeichnung')
|
||||
enabled = models.BooleanField(verbose_name='Tisch aktiv')
|
||||
@ -79,7 +79,7 @@ class Desk(models.Model):
|
||||
|
||||
|
||||
class Accounting(models.Model):
|
||||
desk = models.ForeignKey(Desk, verbose_name="Tisch", on_delete=models.DO_NOTHING)
|
||||
desk = models.ForeignKey(Desk, verbose_name="Tisch", on_delete=models.CASCADE)
|
||||
time_from = models.DateTimeField(verbose_name="Beginn")
|
||||
time_to = models.DateTimeField(blank=True, null=True, verbose_name="Ende")
|
||||
prize = models.DecimalField(max_digits=6, decimal_places=2, blank=True, null=True, verbose_name="Preis")
|
||||
|
Loading…
Reference in New Issue
Block a user