# -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-02-14 15:49
from __future__ import unicode_literals

import django.contrib.postgres.indexes
import django.contrib.postgres.search
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('catalog', '0002_topic'),
    ]

    operations = [
        migrations.CreateModel(
            name='News',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=512)),
                ('date', models.DateTimeField(verbose_name='Publication Date')),
                ('text', models.TextField(blank=True, default='', verbose_name='News Text')),
                ('url', models.URLField(max_length=512, verbose_name='URL')),
                ('search_vector', django.contrib.postgres.search.SearchVectorField(null=True)),
                ('publisher', models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, to='catalog.Publisher')),
                ('topic', models.ManyToManyField(blank=True, to='catalog.Topic', verbose_name='Topic(s)')),
            ],
            options={
                'verbose_name': 'Noticia',
                'verbose_name_plural': 'Noticias',
                'ordering': ('date',),
            },
        ),
        migrations.AddIndex(
            model_name='news',
            index=django.contrib.postgres.indexes.GinIndex(fields=['search_vector'], name='catalog_new_search__62ed1c_gin'),
        ),
    ]
