# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-03-25 23:57
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Document',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_published', models.BooleanField()),
                ('date_uploaded', models.DateTimeField(auto_now_add=True)),
                ('upload', models.FileField(upload_to=due_dilligence.models.Document.doc_directory_path)),
            ],
        ),
        migrations.CreateModel(
            name='MaterialProcessor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('material', models.CharField(max_length=150)),
                ('company_name', models.CharField(max_length=150)),
                ('street_addr', models.CharField(blank=True, max_length=250)),
                ('city', models.CharField(blank=True, max_length=150)),
                ('zip_code', models.CharField(blank=True, max_length=50)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('last_modified', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='UserSubscribedProcessors',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('processor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='due_dilligence.MaterialProcessor')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='document',
            name='processor',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='due_dilligence.MaterialProcessor'),
        ),
        migrations.AddField(
            model_name='document',
            name='uploaded_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
