# Generated by Django 2.1 on 2019-11-07 15:01
import datetime
from django.db import migrations, models
import django.db.models.deletion
from django.utils.timezone import utc
import django.db.models
[docs]class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Operation',
fields=[
('ouid', models.CharField(max_length=128, primary_key=True, serialize=False)),
('op_type', models.CharField(choices=[('ADD', 'ADD'), ('DELETE', 'DELETE'), ('UPDATE', 'UPDATE')], max_length=128)),
('entity_type', models.CharField(max_length=128)),
('target', models.CharField(max_length=128)),
('timestamp', models.DateTimeField()),
('args', django.db.models.JSONField(default=dict)),
],
options={
'db_table': 'operations',
'ordering': ('timestamp', 'ouid', 'trx'),
},
),
migrations.CreateModel(
name='Transaction',
fields=[
('tuid', models.CharField(max_length=128, primary_key=True, serialize=False)),
('name', models.CharField(max_length=128)),
('created_at', models.DateTimeField()),
('closed_at', models.DateTimeField(null=True)),
('is_closed', models.BooleanField(default=False)),
],
options={
'db_table': 'transactions',
'ordering': ('created_at', 'tuid'),
},
),
migrations.AlterModelOptions(
name='enrollment',
options={'ordering': ('start', 'end')},
),
migrations.AlterField(
model_name='enrollment',
name='end',
field=models.DateTimeField(default=datetime.datetime(2100, 1, 1, 0, 0, tzinfo=utc)),
),
migrations.AlterField(
model_name='enrollment',
name='start',
field=models.DateTimeField(default=datetime.datetime(1900, 1, 1, 0, 0, tzinfo=utc)),
),
migrations.AddField(
model_name='operation',
name='trx',
field=models.ForeignKey(db_column='tuid', null=True, on_delete=django.db.models.deletion.CASCADE, to='core.Transaction'),
),
]