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

from django.db import models, migrations


class Migration(migrations.Migration):

    dependencies = [
        ('trainings', '0018_trainingactivity'),
        ('metaplans', '0012_order_become_optional'),
    ]

    operations = [

        # MetaplanTemplate
        migrations.RemoveField(
            model_name='metaplantemplate',
            name='title',
        ),
        migrations.RemoveField(
            model_name='metaplantemplate',
            name='training',
        ),
        migrations.RemoveField(
            model_name='metaplantemplate',
            name='order',
        ),
        migrations.RemoveField(
            model_name='metaplantemplate',
            name='id',
        ),
        migrations.RemoveField(
            model_name='metaplantemplate',
            name='is_deleted',
        ),
        migrations.RemoveField(
            model_name='metaplantemplate',
            name='update_locally',
        ),
        migrations.RemoveField(
            model_name='metaplantemplate',
            name='first_update',
        ),
        migrations.RemoveField(
            model_name='metaplantemplate',
            name='last_update',
        ),
        migrations.AddField(
            model_name='metaplantemplate',
            name='trainingactivity_ptr',
            field=models.OneToOneField(parent_link=True, default=None, serialize=False,
                                       primary_key=True, to='trainings.TrainingActivity',
                                       auto_created=True),
            preserve_default=False,
        ),
        migrations.AlterModelOptions(
            name='metaplantemplate',
            options={'ordering': ['sort_order']},
        ),

        # Metaplan
        migrations.RenameField(
            model_name='metaplan',
            old_name='title',
            new_name='name',
        ),
        migrations.RenameField(
            model_name='metaplan',
            old_name='training_session',
            new_name='session',
        ),

        # MetaplanProposition
        migrations.AlterField(
            model_name='metaplanproposition',
            name='metaplan',
            field=models.ForeignKey(to='metaplans.MetaPlan', related_name='propositions'),
        ),
    ]
