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

from django.db import models, migrations


class Migration(migrations.Migration):

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        ('duplicable_testapp', '0003_auto_20150822_2218'),
    ]

    operations = [
        migrations.CreateModel(
            name='PolymorphicBase',
            fields=[
                ('id', models.AutoField(verbose_name='ID', auto_created=True, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PolymorphicChild1',
            fields=[
                ('polymorphicbase_ptr', models.OneToOneField(primary_key=True, to='duplicable_testapp.PolymorphicBase', auto_created=True, serialize=False, parent_link=True)),
                ('name1', models.CharField(max_length=100)),
            ],
            options={
                'abstract': False,
            },
            bases=('duplicable_testapp.polymorphicbase',),
        ),
        migrations.CreateModel(
            name='PolymorphicChild2',
            fields=[
                ('polymorphicbase_ptr', models.OneToOneField(primary_key=True, to='duplicable_testapp.PolymorphicBase', auto_created=True, serialize=False, parent_link=True)),
                ('name2', models.CharField(max_length=100)),
            ],
            options={
                'abstract': False,
            },
            bases=('duplicable_testapp.polymorphicbase',),
        ),
        migrations.AddField(
            model_name='polymorphicbase',
            name='original_version',
            field=models.ForeignKey(null=True, to='duplicable_testapp.PolymorphicBase', related_name='all_duplicates'),
        ),
        migrations.AddField(
            model_name='polymorphicbase',
            name='parent_version',
            field=models.ForeignKey(null=True, to='duplicable_testapp.PolymorphicBase', related_name='direct_duplicates'),
        ),
        migrations.AddField(
            model_name='polymorphicbase',
            name='polymorphic_ctype',
            field=models.ForeignKey(null=True, editable=False, to='contenttypes.ContentType', related_name='polymorphic_duplicable_testapp.polymorphicbase_set+'),
        ),
    ]
