# -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-08 01:58
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion
import modelcluster.fields


class Migration(migrations.Migration):

    dependencies = [
        ('wagtailcore', '0028_merge'),
        ('header', '0003_auto_20160407_0558'),
    ]

    operations = [
        migrations.CreateModel(
            name='HeaderMenuItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sort_order', models.IntegerField(blank=True, editable=False, null=True)),
                ('link_url', models.CharField(blank=True, max_length=255, null=True, verbose_name='Link to a custom URL')),
                ('link_text', models.CharField(blank=True, help_text='Must be set if you wish to link to a custom URL.', max_length=255)),
                ('url_append', models.CharField(blank=True, max_length=255, verbose_name='Hash or querystring to append to URL')),
                ('allow_subnav', models.BooleanField(default=True, verbose_name='Allow sub-navigation for this page')),
                ('link_page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='wagtailcore.Page', verbose_name='Link to an internal page')),
            ],
            options={
                'ordering': ['sort_order'],
                'abstract': False,
            },
        ),
        migrations.RemoveField(
            model_name='menuitem',
            name='link_page',
        ),
        migrations.RemoveField(
            model_name='menuitem',
            name='parent',
        ),
        migrations.AlterModelOptions(
            name='menu',
            options={'verbose_name': 'menu', 'verbose_name_plural': 'menu'},
        ),
        migrations.AddField(
            model_name='menu',
            name='site',
            field=models.OneToOneField(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='main_menu', to='wagtailcore.Site'),
            preserve_default=False,
        ),
        migrations.DeleteModel(
            name='MenuItem',
        ),
        migrations.AddField(
            model_name='headermenuitem',
            name='menu',
            field=modelcluster.fields.ParentalKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='menu_items', to='header.Menu'),
        ),
    ]
