# Generated by Django 2.2.9 on 2020-01-14 17:29

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='HistoryGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Name')),
                ('code', models.CharField(max_length=100, unique=True, verbose_name='Code')),
            ],
            options={
                'verbose_name': 'History group',
                'verbose_name_plural': 'History groups',
            },
        ),
        migrations.CreateModel(
            name='HistoryRecord',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField(max_length=1000, verbose_name='Text')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='Creation date')),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='history.HistoryGroup', verbose_name='Group')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='history_records', to=settings.AUTH_USER_MODEL, verbose_name='User')),
            ],
            options={
                'verbose_name': 'History record',
                'verbose_name_plural': 'History records',
            },
        ),
    ]
