# -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2016-08-25 10:31
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('wagtaildocs', '0007_merge'),
        ('wagtailcore', '0028_merge'),
    ]

    operations = [
        migrations.CreateModel(
            name='ImageMap',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255, verbose_name='title')),
                ('svg', models.FileField(help_text='Choose a valid SVG file. The document must contain elements that have IDs.', upload_to='imagemaps/%Y/%m/%d', verbose_name='SVG file')),
                ('_ids_cache', models.TextField(blank=True, db_column='ids_cache', editable=False)),
                ('_render_cache', models.TextField(blank=True, db_column='render_cache', editable=False)),
            ],
        ),
        migrations.CreateModel(
            name='Region',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('link_external', models.URLField(blank=True, verbose_name='external link')),
                ('element_id', models.CharField(max_length=64, verbose_name='element ID')),
                ('target', models.CharField(blank=True, help_text='Use _blank to open links in new windows.', max_length=64, verbose_name='link target')),
                ('image_map', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='regions', to='wagtail_svgmap.ImageMap')),
                ('link_document', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='wagtaildocs.Document', verbose_name='linked document')),
                ('link_page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='wagtailcore.Page', verbose_name='linked page')),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='region',
            unique_together=set([('image_map', 'element_id')]),
        ),
    ]
