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

from django.db import migrations, models
import django_extensions.db.fields
import mtp.apps.sync.models


class Migration(migrations.Migration):

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        ('sync', '0002_auto_20150831_1334'),
        ('syncable_testapp', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='SyncablePolymorphicModel',
            fields=[
                ('id', django_extensions.db.fields.UUIDField(editable=False, serialize=False, primary_key=True, blank=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
            bases=(mtp.apps.sync.models.SyncableForPolymorphicMixin, models.Model),
        ),
        migrations.CreateModel(
            name='SyncableChildrenPolymorphicModel',
            fields=[
                ('syncablepolymorphicmodel_ptr', models.OneToOneField(auto_created=True, serialize=False, primary_key=True, parent_link=True, to='syncable_testapp.SyncablePolymorphicModel')),
            ],
            options={
                'abstract': False,
            },
            bases=('syncable_testapp.syncablepolymorphicmodel',),
        ),
        migrations.AddField(
            model_name='syncablepolymorphicmodel',
            name='first_update',
            field=models.ForeignKey(related_name='syncable_testapp_syncablepolymorphicmodel_by_first', blank=True, null=True, to='sync.Update'),
        ),
        migrations.AddField(
            model_name='syncablepolymorphicmodel',
            name='last_update',
            field=models.ForeignKey(related_name='syncable_testapp_syncablepolymorphicmodel_by_last', blank=True, null=True, to='sync.Update'),
        ),
        migrations.AddField(
            model_name='syncablepolymorphicmodel',
            name='polymorphic_ctype',
            field=models.ForeignKey(related_name='polymorphic_syncable_testapp.syncablepolymorphicmodel_set+', null=True, editable=False, to='contenttypes.ContentType'),
        ),
    ]
