ytsm/app/YtManagerApp/migrations/0009_jobexecution_jobmessage.py

40 lines
1.8 KiB
Python
Raw Normal View History

2019-08-14 14:14:16 +00:00
# Generated by Django 2.1.7 on 2019-04-08 15:26
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('YtManagerApp', '0008_auto_20181229_2035'),
]
operations = [
migrations.CreateModel(
name='JobExecution',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('start_date', models.DateTimeField(auto_now=True)),
('end_date', models.DateTimeField(null=True)),
('description', models.CharField(default='', max_length=250)),
('status', models.IntegerField(choices=[('running', 0), ('finished', 1), ('failed', 2), ('interrupted', 3)], default=0)),
('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='JobMessage',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('timestamp', models.DateTimeField(auto_now=True)),
('progress', models.FloatField(null=True)),
('message', models.CharField(default='', max_length=1024)),
('level', models.IntegerField(choices=[('normal', 0), ('warning', 1), ('error', 2)], default=0)),
('suppress_notification', models.BooleanField(default=False)),
('job', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='YtManagerApp.JobExecution')),
],
),
]