Sith/core/migrations/0027_gift.py

45 lines
1.3 KiB
Python
Raw Normal View History

2017-11-05 23:22:25 +00:00
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
import django.utils.timezone
import django.db.models.deletion
2017-11-05 23:22:25 +00:00
class Migration(migrations.Migration):
2018-10-04 19:29:19 +00:00
dependencies = [("core", "0026_auto_20170926_1512")]
2017-11-05 23:22:25 +00:00
operations = [
migrations.CreateModel(
2018-10-04 19:29:19 +00:00
name="Gift",
2017-11-05 23:22:25 +00:00
fields=[
2018-10-04 19:29:19 +00:00
(
"id",
models.AutoField(
primary_key=True,
auto_created=True,
verbose_name="ID",
serialize=False,
),
),
("label", models.CharField(max_length=255, verbose_name="label")),
(
"date",
models.DateTimeField(
default=django.utils.timezone.now, verbose_name="date"
),
),
(
"user",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="gifts",
to=settings.AUTH_USER_MODEL,
2018-10-04 19:29:19 +00:00
),
),
2017-11-05 23:22:25 +00:00
],
2018-10-04 19:29:19 +00:00
)
2017-11-05 23:22:25 +00:00
]