# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-08-31 12:49
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('wagtailcore', '0020_add_index_on_page_first_published_at'),
    ]

    operations = [
        migrations.CreateModel(
            name='ModeratedItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('moderated', models.DateTimeField(auto_now_add=True)),
                ('posted', models.DateTimeField()),
                ('external_id', models.CharField(max_length=255)),
                ('content', models.TextField()),
            ],
            options={
                'ordering': ['-posted'],
            },
        ),
        migrations.CreateModel(
            name='SocialFeedConfiguration',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('source', models.CharField(choices=[('twitter', 'Twitter'), ('instagram', 'Instagram')], max_length=100, verbose_name='Feed source')),
                ('username', models.CharField(max_length=255, verbose_name='User to track')),
                ('moderated', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='SocialFeedPage',
            fields=[
                ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
                ('feedconfig', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='wagtailsocialfeed.SocialFeedConfiguration')),
            ],
            options={
                'abstract': False,
            },
            bases=('wagtailcore.page',),
        ),
        migrations.AddField(
            model_name='moderateditem',
            name='config',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='moderated_items', to='wagtailsocialfeed.SocialFeedConfiguration'),
        ),
    ]
