# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-09-24 18:51
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('content', '0023_contentcomment'),
    ]

    operations = [
        migrations.CreateModel(
            name='ContentWatcher',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('silent', models.BooleanField(default=False)),
                ('content_editorial_metadata', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='content.ContentEditorialMetadata')),
                ('watcher', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='watching_content', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='contenteditorialmetadata',
            name='watchers',
            field=models.ManyToManyField(through='content.ContentWatcher', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterUniqueTogether(
            name='contentwatcher',
            unique_together=set([('content_editorial_metadata', 'watcher')]),
        ),
    ]
