1
0
Fork 0
mirror of https://github.com/Findus23/RPGnotes.git synced 2024-09-19 15:43:45 +02:00
RPGnotes/locations/migrations/0002_auto_20210915_1359.py

57 lines
2.5 KiB
Python

# Generated by Django 3.2.7 on 2021-09-15 11:59
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import simple_history.models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('locations', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
name='location',
options={'ordering': ['name']},
),
migrations.AddField(
model_name='location',
name='created',
field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now),
preserve_default=False,
),
migrations.AddField(
model_name='location',
name='last_modified',
field=models.DateTimeField(auto_now=True),
),
migrations.CreateModel(
name='HistoricalLocation',
fields=[
('id', models.BigIntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
('description_md', models.TextField(blank=True)),
('description_html', models.TextField(blank=True, editable=False)),
('name', models.CharField(max_length=1000)),
('slug', models.SlugField(editable=False)),
('created', models.DateTimeField(blank=True, editable=False)),
('last_modified', models.DateTimeField(blank=True, editable=False)),
('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)),
('part_of', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='locations.location')),
],
options={
'verbose_name': 'historical location',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': 'history_date',
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
]