<filename>backend/api/migrations/0001_initial.py
# Generated by Django 3.1.2 on 2020-10-05 10:33

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='Inventory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('hosts_file', models.TextField()),
                ('groups_file', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('status', models.IntegerField(choices=[(1, 'Scheduled'), (2, 'Running'), (3, 'Finished'), (4, 'Failed')], default=1)),
                ('date_scheduled', models.DateTimeField(verbose_name='Date Scheduled')),
                ('date_started', models.DateTimeField(null=True, verbose_name='Date Started')),
                ('date_finished', models.DateTimeField(null=True, verbose_name='Date Finished')),
                ('variables', models.TextField()),
                ('input', models.TextField()),
                ('result', models.TextField()),
                ('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='JobTemplate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('description', models.TextField()),
                ('file_path', models.TextField()),
                ('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='InventoryFilter',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('filter', models.TextField()),
                ('inventory', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.inventory')),
                ('task', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.task')),
            ],
        ),
    ]

<filename>backend/api/migrations/0001_initial.py
# Generated by Django 3.1.2 on 2020-10-05 10:33

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='Inventory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('hosts_file', models.TextField()),
                ('groups_file', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('status', models.IntegerField(choices=[(1, 'Scheduled'), (2, 'Running'), (3, 'Finished'), (4, 'Failed')], default=1)),
                ('date_scheduled', models.DateTimeField(verbose_name='Date Scheduled')),
                ('date_started', models.DateTimeField(null=True, verbose_name='Date Started')),
                ('date_finished', models.DateTimeField(null=True, verbose_name='Date Finished')),
                ('variables', models.TextField()),
                ('input', models.TextField()),
                ('result', models.TextField()),
                ('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='JobTemplate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('description', models.TextField()),
                ('file_path', models.TextField()),
                ('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='InventoryFilter',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('filter', models.TextField()),
                ('inventory', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.inventory')),
                ('task', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.task')),
            ],
        ),
    ]

# Generated by Django 3.1.2 on 2020-10-05 10:33