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

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('metaplans', '0014_auto_20150831_1334'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='metaplantemplate',
            name='trainingactivity_ptr',
        ),
        migrations.AlterField(
            model_name='metaplanproposition',
            name='metaplan',
            field=models.ForeignKey(related_name='propositions', to='metaplans.Metaplan'),
        ),
        migrations.RunSQL(
            """
            DELETE FROM trainings_trainingactivity WHERE
            polymorphic_ctype_id=(
                SELECT id FROM django_content_type
                WHERE app_label = 'metaplans'
                AND model = 'metaplantemplate'
            )""", reverse_sql=migrations.RunSQL.noop),

        migrations.DeleteModel(
            name='MetaplanTemplate',
        ),
    ]
