# Generated by Django 3.2.15 on 2023-02-10 13:13

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='ManagementCommand',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, unique=True)),
                ('app_label', models.CharField(max_length=255)),
                ('help', models.TextField(default='')),
                ('default_args', models.TextField(default='')),
                ('deleted', models.BooleanField(default=False)),
            ],
            options={
                'verbose_name': 'Management Command',
                'verbose_name_plural': 'Management Commands',
                'permissions': [('execute_command', 'Can execute command')],
                'default_permissions': [],
            },
        ),
        migrations.CreateModel(
            name='CallCommandLog',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('started', models.DateTimeField(auto_now_add=True)),
                ('finished', models.DateTimeField(null=True)),
                ('args', models.TextField()),
                ('output', models.TextField(default='')),
                ('error', models.TextField(default='')),
                ('command', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='admin_commands.managementcommand')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': [('view_other_users_log', 'View other users log')],
                'default_permissions': [],
            },
        ),
    ]
