# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-02-02 10:29
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Media',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.SmallIntegerField(choices=[(1, 'Image'), (2, 'Video')])),
                ('url', models.URLField(max_length=2000, validators=[textbin.models.valid_url_media])),
            ],
        ),
        migrations.CreateModel(
            name='Text',
            fields=[
                ('id', models.CharField(default=textbin.models._unique_id, editable=False, max_length=10, primary_key=True, serialize=False)),
                ('text', models.TextField(blank=True, default='')),
                ('posted_at', models.DateTimeField(auto_now_add=True)),
                ('author_name', models.CharField(blank=True, default='Anonymous', max_length=100)),
                ('author_url', models.URLField(blank=True, default='')),
            ],
        ),
        migrations.AddField(
            model_name='media',
            name='text',
            field=models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='media', to='textbin.Text', verbose_name='Attached to'),
        ),
    ]
