# -*- coding: utf-8 -*-
from __future__ import unicode_literals

import django

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


class Migration(migrations.Migration):

    if django.VERSION >= (1, 8, 0):
        dependencies = [
            ('contenttypes', '0002_remove_content_type_name'),
            migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ]

    operations = [
        migrations.CreateModel(
            name='NoticeQueueBatch',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('pickled_data', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='NoticeSetting',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('medium', models.CharField(max_length=1, verbose_name='medium', choices=[(0, 'email')])),
                ('send', models.BooleanField(default=False, verbose_name='send')),
                ('scoping_object_id', models.PositiveIntegerField(null=True, blank=True)),
            ],
            options={
                'verbose_name': 'notice setting',
                'verbose_name_plural': 'notice settings',
            },
        ),
        migrations.CreateModel(
            name='NoticeType',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('label', models.CharField(max_length=40, verbose_name='label')),
                ('display', models.CharField(max_length=50, verbose_name='display')),
                ('description', models.CharField(max_length=100, verbose_name='description')),
                ('default', models.IntegerField(verbose_name='default')),
            ],
            options={
                'verbose_name': 'notice type',
                'verbose_name_plural': 'notice types',
            },
        ),
        migrations.AddField(
            model_name='noticesetting',
            name='notice_type',
            field=models.ForeignKey(verbose_name='notice type', to='notifications.NoticeType'),
        ),
        migrations.AddField(
            model_name='noticesetting',
            name='scoping_content_type',
            field=models.ForeignKey(blank=True, to='contenttypes.ContentType', null=True),
        ),
        migrations.AddField(
            model_name='noticesetting',
            name='user',
            field=models.ForeignKey(verbose_name='user', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterUniqueTogether(
            name='noticesetting',
            unique_together=set([('user', 'notice_type', 'medium', 'scoping_content_type', 'scoping_object_id')]),
        ),
    ]

@@ -189,16 +189,110 @@
 tion):%0A%0A
+    dependencies = %5B%0A        migrations.swappable_dependency(settings.AUTH_USER_MODEL),%0A    %5D%0A
     if d
@@ -331,36 +331,42 @@
     dependencies
- = %5B
+.insert(0,
 %0A            ('c
@@ -415,90 +415,9 @@
 me')
-,%0A            migrations.swappable_dependency(settings.AUTH_USER_MODEL),%0A        %5D
+)
 %0A%0A  

add dependency to migration to fix issue #48