dms/evolus/migrations/0013_auto_20170920_1436.py

56 lines
2.4 KiB
Python
Raw Normal View History

2017-09-20 15:34:03 +02:00
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-09-20 12:36
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('evolus', '0012_auto_20170919_1619'),
]
operations = [
migrations.CreateModel(
name='HistoricalDocument',
fields=[
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
('title', models.CharField(max_length=255)),
('overview', models.TextField(blank=True, null=True)),
('created_at', models.DateTimeField(blank=True, editable=False)),
('revised_at', models.DateTimeField(blank=True, null=True)),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_date', models.DateTimeField()),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
('type', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='evolus.DocumentType')),
],
options={
'verbose_name': 'historical document',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': 'history_date',
},
),
migrations.AlterModelOptions(
name='audience',
options={'ordering': ('name',)},
),
migrations.AddField(
model_name='document',
name='created_at',
field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now),
preserve_default=False,
),
migrations.AddField(
model_name='document',
name='revised_at',
field=models.DateTimeField(blank=True, null=True),
),
]