# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2017-06-26 18:14
from __future__ import unicode_literals

import blogger.apps.entradas.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('principal', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Comentario',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha', models.DateField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Entrada',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('titulo_entrada', models.CharField(max_length=50)),
                ('fecha_entrada', models.DateField(auto_now=True)),
                ('fecha_actualizacion_entrada', models.DateField(blank=True, null=True)),
                ('slug_entrada', models.SlugField(blank=True, max_length=80, null=True, unique=True)),
                ('descripcion_entrada', models.CharField(max_length=2000)),
                ('imagen_portada', models.ImageField(upload_to=blogger.apps.entradas.models.image_directory_path)),
                ('institucion', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='principal.Institucion')),
                ('usuario', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='comentario',
            name='entrada',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='entradas.Entrada'),
        ),
        migrations.AddField(
            model_name='comentario',
            name='usuario',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
