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

from django.db import migrations, models
import uuidfield.fields


class Migration(migrations.Migration):

    replaces = [(b'template', '0001_initial'), (b'template', '0002_inherit_namemixin'), (b'template', '0003_rename_tamplate_field'), (b'template', '0004_upgrate_polymorphic_package')]

    dependencies = [
        ('contenttypes', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Template',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('description', models.CharField(max_length=500, verbose_name='description', blank=True)),
                ('icon_url', models.URLField(verbose_name='icon url', blank=True)),
                ('uuid', uuidfield.fields.UUIDField(unique=True, max_length=32, editable=False, blank=True)),
                ('name', models.CharField(unique=True, max_length=100)),
                ('is_active', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='TemplateService',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=100)),
                ('polymorphic_ctype', models.ForeignKey(related_name='polymorphic_template.templateservice_set', editable=False, to='contenttypes.ContentType', null=True)),
                ('template', models.ForeignKey(related_name='services', to='template.Template')),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='templateservice',
            unique_together=set([('template', 'name')]),
        ),
        migrations.AlterField(
            model_name='template',
            name='name',
            field=models.CharField(unique=True, max_length=150),
        ),
        migrations.AlterField(
            model_name='templateservice',
            name='name',
            field=models.CharField(max_length=150, verbose_name='name'),
        ),
        migrations.RenameField(
            model_name='templateservice',
            old_name='template',
            new_name='base_template',
        ),
        migrations.AlterUniqueTogether(
            name='templateservice',
            unique_together=set([('base_template', 'name', 'polymorphic_ctype')]),
        ),
    ]

@@ -996,33 +996,33 @@
 ue, max_length=1
-0
+5
 0)),%0A           
@@ -1433,18 +1433,39 @@
 length=1
-00
+50, verbose_name='name'
 )),%0A    
@@ -1651,16 +1651,21 @@
       ('
+base_
 template
@@ -1842,657 +1842,8 @@
 e',%0A
-            unique_together=set(%5B('template', 'name')%5D),%0A        ),%0A        migrations.AlterField(%0A            model_name='template',%0A            name='name',%0A            field=models.CharField(unique=True, max_length=150),%0A        ),%0A        migrations.AlterField(%0A            model_name='templateservice',%0A            name='name',%0A            field=models.CharField(max_length=150, verbose_name='name'),%0A        ),%0A        migrations.RenameField(%0A            model_name='templateservice',%0A            old_name='template',%0A            new_name='base_template',%0A        ),%0A        migrations.AlterUniqueTogether(%0A            name='templateservice',%0A
     

Fix template migration