<reponame>PawlikMateusz/DjangoEmailRestApi
# Generated by Django 2.0.13 on 2019-02-28 19:18

import django.contrib.postgres.fields
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Email',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('to', django.contrib.postgres.fields.ArrayField(base_field=models.EmailField(max_length=254), size=None)),
                ('cc', django.contrib.postgres.fields.ArrayField(base_field=models.EmailField(blank=True, max_length=254, null=True), size=None)),
                ('bcc', django.contrib.postgres.fields.ArrayField(base_field=models.EmailField(blank=True, max_length=254, null=True), size=None)),
                ('reply_to', models.EmailField(blank=True, default=None, max_length=254, null=True)),
                ('send_date', models.DateTimeField()),
                ('date', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Mailbox',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('host', models.CharField(max_length=100)),
                ('port', models.IntegerField(default=465)),
                ('login', models.CharField(max_length=30)),
                ('password', models.CharField(max_length=30)),
                ('email_from', models.CharField(max_length=50)),
                ('use_ssl', models.BooleanField(default=True)),
                ('is_active', models.BooleanField(default=False)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('last_update', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Template',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('subject', models.CharField(max_length=200)),
                ('text', models.TextField()),
                ('attachment', models.FileField(blank=True, null=True, upload_to='')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('last_update', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.AddField(
            model_name='email',
            name='mailbox',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='emails', to='api.Mailbox'),
        ),
        migrations.AddField(
            model_name='email',
            name='template',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='emails', to='api.Template'),
        ),
    ]

# Generated by Django 2.0.13 on 2019-02-28 19:18

import django.contrib.postgres.fields
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Email',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('to', django.contrib.postgres.fields.ArrayField(base_field=models.EmailField(max_length=254), size=None)),
                ('cc', django.contrib.postgres.fields.ArrayField(base_field=models.EmailField(blank=True, max_length=254, null=True), size=None)),
                ('bcc', django.contrib.postgres.fields.ArrayField(base_field=models.EmailField(blank=True, max_length=254, null=True), size=None)),
                ('reply_to', models.EmailField(blank=True, default=None, max_length=254, null=True)),
                ('send_date', models.DateTimeField()),
                ('date', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Mailbox',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('host', models.CharField(max_length=100)),
                ('port', models.IntegerField(default=465)),
                ('login', models.CharField(max_length=30)),
                ('password', models.CharField(max_length=30)),
                ('email_from', models.CharField(max_length=50)),
                ('use_ssl', models.BooleanField(default=True)),
                ('is_active', models.BooleanField(default=False)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('last_update', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Template',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('subject', models.CharField(max_length=200)),
                ('text', models.TextField()),
                ('attachment', models.FileField(blank=True, null=True, upload_to='')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('last_update', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.AddField(
            model_name='email',
            name='mailbox',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='emails', to='api.Mailbox'),
        ),
        migrations.AddField(
            model_name='email',
            name='template',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='emails', to='api.Template'),
        ),
    ]
# Generated by Django 2.0.13 on 2019-02-28 19:18