0009_eticket.py 1.28 KB
Newer Older
Skia's avatar
Skia committed
1
2
3
4
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models
5
import django.db.models.deletion
Skia's avatar
Skia committed
6
7
8
9


class Migration(migrations.Migration):

Sli's avatar
Sli committed
10
    dependencies = [("counter", "0008_counter_token")]
Skia's avatar
Skia committed
11
12
13

    operations = [
        migrations.CreateModel(
Sli's avatar
Sli committed
14
            name="Eticket",
Skia's avatar
Skia committed
15
            fields=[
Sli's avatar
Sli committed
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
                (
                    "id",
                    models.AutoField(
                        verbose_name="ID",
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                (
                    "banner",
                    models.ImageField(null=True, upload_to="etickets", blank=True),
                ),
                (
                    "secret",
                    models.CharField(unique=True, verbose_name="secret", max_length=64),
                ),
                (
                    "product",
                    models.OneToOneField(
36
                        on_delete=django.db.models.deletion.CASCADE,
Sli's avatar
Sli committed
37
38
39
40
41
                        verbose_name="product",
                        related_name="eticket",
                        to="counter.Product",
                    ),
                ),
Skia's avatar
Skia committed
42
            ],
Sli's avatar
Sli committed
43
        )
Skia's avatar
Skia committed
44
    ]