Sith/accounting/migrations/0004_auto_20161005_1505.py

53 lines
1.6 KiB
Python
Raw Normal View History

2016-10-05 13:54:00 +00:00
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
2018-10-04 19:29:19 +00:00
dependencies = [("accounting", "0003_auto_20160824_2203")]
2016-10-05 13:54:00 +00:00
operations = [
migrations.CreateModel(
2018-10-04 19:29:19 +00:00
name="Label",
2016-10-05 13:54:00 +00:00
fields=[
2018-10-04 19:29:19 +00:00
(
"id",
models.AutoField(
verbose_name="ID",
primary_key=True,
auto_created=True,
serialize=False,
),
),
("name", models.CharField(max_length=64, verbose_name="label")),
(
"club_account",
models.ForeignKey(
related_name="labels",
verbose_name="club account",
to="accounting.ClubAccount",
on_delete=django.db.models.deletion.CASCADE,
2018-10-04 19:29:19 +00:00
),
),
2016-10-05 13:54:00 +00:00
],
),
migrations.AddField(
2018-10-04 19:29:19 +00:00
model_name="operation",
name="label",
field=models.ForeignKey(
on_delete=django.db.models.deletion.SET_NULL,
related_name="operations",
null=True,
blank=True,
verbose_name="label",
to="accounting.Label",
),
2016-10-05 13:54:00 +00:00
),
migrations.AlterUniqueTogether(
2018-10-04 19:29:19 +00:00
name="label", unique_together=set([("name", "club_account")])
2016-10-05 13:54:00 +00:00
),
]