# Generated by Django 3.2.6 on 2021-08-19 21:01

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


class Migration(migrations.Migration):

    dependencies = [
        ('schemas', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Job',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(default=django.utils.timezone.now, editable=False)),
                ('status', models.PositiveSmallIntegerField(choices=[(0, 'Processing'), (1, 'Ready'), (2, 'Error')], default=0)),
                ('error', models.CharField(blank=True, max_length=255, null=True)),
                ('payload', models.JSONField(default=dict)),
            ],
        ),
        migrations.AddField(
            model_name='schema',
            name='created',
            field=models.DateTimeField(default=django.utils.timezone.now, editable=False),
        ),
        migrations.AddField(
            model_name='schema',
            name='modified',
            field=models.DateTimeField(default=django.utils.timezone.now, editable=False),
        ),
        migrations.AlterField(
            model_name='schema',
            name='column_separator',
            field=models.CharField(choices=[('comma', 'Comma (,)'), ('semicolon', 'Semicolon (;)'), ('tab', 'Tab (\\t)'), ('space', 'Space ( )'), ('pipe', 'Pipe (|)')], default='comma', max_length=50),
        ),
        migrations.AlterField(
            model_name='schema',
            name='string_character',
            field=models.CharField(choices=[('double-quote', 'Double-quote (")'), ('single-quote', "Single-quote (')")], default='double-quote', max_length=50),
        ),
        migrations.CreateModel(
            name='Column',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('type', models.CharField(choices=[('full_name', 'Full name'), ('job', 'Job'), ('email', 'E-mail'), ('domain_name', 'Domain name'), ('phone_number', 'Phone number'), ('company_name', 'Company name'), ('text', 'Text'), ('integer', 'Integer'), ('address', 'Address'), ('date', 'Date')], max_length=50)),
                ('range_from', models.PositiveIntegerField(blank=True, null=True)),
                ('range_to', models.PositiveIntegerField(blank=True, null=True)),
                ('quantity', models.PositiveIntegerField(blank=True, null=True)),
                ('order', models.PositiveIntegerField()),
                ('schema', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='columns', to='schemas.schema')),
            ],
        ),
    ]
