# Generated by Django 3.0.2 on 2020-02-21 10:54

from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('first_name', models.CharField(blank=True, max_length=25)),
                ('last_name', models.CharField(blank=True, max_length=25)),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('password', models.CharField(max_length=254)),
                ('phone_no', models.CharField(blank=True, help_text='Contact phone number', max_length=17, null=True)),
                ('is_active', models.BooleanField(default=False)),
                ('is_deleted', models.BooleanField(default=False)),
                ('is_staff', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'db_table': 'auth_user',
            },
        ),
        migrations.CreateModel(
            name='Application',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('is_active', models.BooleanField(default=True)),
                ('is_deleted', models.BooleanField(default=False)),
            ],
            options={
                'db_table': 'application',
            },
        ),
        migrations.CreateModel(
            name='applicationHeader',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('is_active', models.BooleanField(default=True)),
                ('is_deleted', models.BooleanField(default=False)),
            ],
            options={
                'db_table': 'application_header',
            },
        ),
        migrations.CreateModel(
            name='applicationType',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('is_active', models.BooleanField(default=True)),
                ('is_deleted', models.BooleanField(default=False)),
            ],
            options={
                'db_table': 'application_type',
            },
        ),
        migrations.CreateModel(
            name='deploymentRequest',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('requested_branch', models.CharField(max_length=200)),
                ('requested_by', models.CharField(max_length=100)),
                ('description', models.CharField(max_length=1000)),
                ('technician_id', models.IntegerField()),
                ('status', models.CharField(max_length=100)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('is_active', models.BooleanField(default=True)),
                ('is_deleted', models.BooleanField(default=False)),
            ],
            options={
                'db_table': 'deployment_request',
            },
        ),
        migrations.CreateModel(
            name='Environment',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('is_active', models.BooleanField(default=True)),
                ('is_deleted', models.BooleanField(default=False)),
            ],
            options={
                'db_table': 'environment',
            },
        ),
        migrations.CreateModel(
            name='Program',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('server', models.CharField(max_length=100)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('is_active', models.BooleanField(default=True)),
                ('is_deleted', models.BooleanField(default=False)),
            ],
            options={
                'db_table': 'program',
            },
        ),
        migrations.CreateModel(
            name='programVersion',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('branch', models.CharField(blank=True, max_length=100, null=True)),
                ('updated_by', models.CharField(blank=True, max_length=100, null=True)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('is_active', models.BooleanField(default=True)),
                ('is_deleted', models.BooleanField(default=False)),
            ],
            options={
                'db_table': 'program_version',
            },
        ),
        migrations.CreateModel(
            name='requestNormal',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=200)),
                ('description', models.CharField(max_length=1000)),
                ('attachment', models.FileField(blank=True, null=True, upload_to='uploads/')),
                ('status', models.CharField(max_length=100)),
                ('requested_by', models.CharField(max_length=100)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('is_active', models.BooleanField(default=True)),
                ('is_deleted', models.BooleanField(default=False)),
            ],
            options={
                'db_table': 'request_normal',
            },
        ),
        migrations.CreateModel(
            name='Role',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('is_active', models.BooleanField(default=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'db_table': 'roles',
            },
        ),
        migrations.AddIndex(
            model_name='role',
            index=models.Index(fields=['id', 'name'], name='roles_id_1c77ee_idx'),
        ),
        migrations.AddIndex(
            model_name='requestnormal',
            index=models.Index(fields=['id', 'title', 'description', 'attachment', 'status', 'requested_by'], name='request_nor_id_b34727_idx'),
        ),
        migrations.AddField(
            model_name='programversion',
            name='application',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='application', to='baserooter.Application'),
        ),
        migrations.AddField(
            model_name='program',
            name='application_type',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='application_type', to='baserooter.applicationType'),
        ),
        migrations.AddField(
            model_name='program',
            name='environment',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='environment', to='baserooter.Environment'),
        ),
        migrations.AddIndex(
            model_name='environment',
            index=models.Index(fields=['id', 'name'], name='environment_id_6d2d8b_idx'),
        ),
        migrations.AddField(
            model_name='deploymentrequest',
            name='program_version',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='program_version', to='baserooter.programVersion'),
        ),
        migrations.AddIndex(
            model_name='applicationtype',
            index=models.Index(fields=['id', 'name'], name='application_id_424708_idx'),
        ),
        migrations.AddField(
            model_name='applicationheader',
            name='application_type',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='app_type', to='baserooter.applicationType'),
        ),
        migrations.AddField(
            model_name='applicationheader',
            name='environment',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='env', to='baserooter.Environment'),
        ),
        migrations.AddField(
            model_name='application',
            name='program',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='program', to='baserooter.Program'),
        ),
        migrations.AddField(
            model_name='user',
            name='groups',
            field=models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups'),
        ),
        migrations.AddField(
            model_name='user',
            name='role',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='roles', to='baserooter.Role'),
        ),
        migrations.AddField(
            model_name='user',
            name='user_permissions',
            field=models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions'),
        ),
        migrations.AddIndex(
            model_name='programversion',
            index=models.Index(fields=['id', 'name', 'branch', 'updated_by', 'application'], name='program_ver_id_4badcb_idx'),
        ),
        migrations.AddIndex(
            model_name='program',
            index=models.Index(fields=['id', 'name', 'server', 'environment', 'application_type'], name='program_id_bb6373_idx'),
        ),
        migrations.AddIndex(
            model_name='deploymentrequest',
            index=models.Index(fields=['id', 'program_version', 'requested_branch', 'requested_by', 'description', 'technician_id', 'status'], name='deployment__id_513d56_idx'),
        ),
        migrations.AddIndex(
            model_name='applicationheader',
            index=models.Index(fields=['id', 'name'], name='application_id_12541e_idx'),
        ),
        migrations.AddIndex(
            model_name='application',
            index=models.Index(fields=['id', 'name', 'program'], name='application_id_f948cf_idx'),
        ),
        migrations.AddIndex(
            model_name='user',
            index=models.Index(fields=['id', 'first_name', 'last_name', 'email', 'is_active'], name='auth_user_id_afe805_idx'),
        ),
    ]
