# Generated by Django 2.2.2 on 2019-08-20 11:29

import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Projects',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('project_name', models.CharField(max_length=255, unique=True)),
            ],
            options={
                'db_table': 'user_projects',
                'ordering': ['-updated_at'],
            },
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=255)),
                ('email', models.EmailField(max_length=255, unique=True, validators=[django.core.validators.EmailValidator()])),
                ('designation', models.CharField(choices=[('BACK-END DEVELOPER', 'DEVELOPERS'), ('FRONT-END DEVELOPER', 'DEVELOPERS'), ('TEAM_LEAD', 'TEAM_LEAD'), ('PROJECT_MANAGER', 'PROJECT_MANAGER'), ('CEO', 'CEO'), ('DEVOPS', 'DEVOPS'), ('DATA_OPERATORS', 'DATA_OPERATORS'), ('DATA_SCIENTIST', 'DATA_SCIENTIST'), ('MANUAL TESTER', 'TESTING'), ('AUTOMATION TESTER', 'TESTING')], max_length=255)),
                ('user_type', models.CharField(choices=[('ADMIN', 'ADMIN'), ('USER', 'USER')], default='USER', max_length=255)),
                ('phone_number', models.CharField(max_length=10, null=True, unique=True)),
                ('joined_on', models.DateField(blank=True)),
                ('password', models.TextField(max_length=255, null=True)),
                ('reset_code', models.TextField(max_length=255, null=True)),
                ('is_active', models.BooleanField(default=False)),
                ('is_blocked', models.BooleanField(default=True)),
            ],
            options={
                'db_table': 'users',
                'ordering': ['-updated_at'],
            },
        ),
        migrations.CreateModel(
            name='ProjectVersions',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('repo_url', models.URLField(null=True)),
                ('is_hosted', models.BooleanField(default=False)),
                ('hosted_username', models.TextField(max_length=255, null=True)),
                ('hosted_password', models.TextField(max_length=255, null=True)),
                ('hosted_ip_address', models.TextField(max_length=255, null=True)),
                ('postman_link', models.URLField(null=True)),
                ('status', models.TextField(choices=[('Requirement Gathering', 'Requirement Gathering'), ('Development', 'Development'), ('Testing', 'Testing'), ('Staging', 'Staging'), ('Ready For Production', 'Ready For Production'), ('Moved To Production', 'Moved To Production'), ('Refactory', 'Refactory'), ('Rewriting', 'Rewriting'), ('Parked', 'Parked')], max_length=255)),
                ('version', models.TextField(max_length=100)),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_created_fk', to='trackerapp.User')),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_projects_fk', to='trackerapp.Projects')),
                ('updated_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_updated_fk', to='trackerapp.User')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ProjectUsers',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('role', models.CharField(choices=[('BACK-END DEVELOPER', 'DEVELOPERS'), ('FRONT-END DEVELOPER', 'DEVELOPERS'), ('TEAM_LEAD', 'TEAM_LEAD'), ('PROJECT_MANAGER', 'PROJECT_MANAGER'), ('CEO', 'CEO'), ('DEVOPS', 'DEVOPS'), ('DATA_OPERATORS', 'DATA_OPERATORS'), ('DATA_SCIENTIST', 'DATA_SCIENTIST'), ('MANUAL TESTER', 'TESTING'), ('AUTOMATION TESTER', 'TESTING')], max_length=255)),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='projectid_fk', to='trackerapp.Projects')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='userid_fk', to='trackerapp.User')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='projects',
            name='created_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='project_created_fk', to='trackerapp.User'),
        ),
        migrations.AddField(
            model_name='projects',
            name='updated_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='project_updated_fk', to='trackerapp.User'),
        ),
    ]
