# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-03 13:09
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('designer', '0007_auto_20161003_1243'),
    ]

    operations = [
        migrations.CreateModel(
            name='MetaProperty',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, unique=True, validators=[django.core.validators.RegexValidator(message="Property name doesn't comply", regex='^[a-zA-Z_$][a-zA-Z_$0-9]*$')])),
                ('description', models.CharField(blank=True, max_length=100, null=True)),
                ('property_type', models.CharField(choices=[('Smallint', 'Smallint'), ('Int', 'Int'), ('Bigint', 'Bigint'), ('Varint', 'Varint'), ('Float', 'Float'), ('Double', 'Double'), ('Decimal', 'Decimal'), ('Boolean', 'Boolean'), ('Text', 'Text'), ('Uuid', 'Uuid'), ('Timestamp', 'Timestamp'), ('Duration', 'Duration'), ('Linestring', 'Linestring'), ('Polygon', 'Polygon'), ('Inet', 'Inet'), ('Blob', 'Blob')], default='Text', max_length=10)),
            ],
            options={
                'verbose_name_plural': 'properties',
            },
        ),
        migrations.AlterModelOptions(
            name='property',
            options={'verbose_name_plural': 'properties'},
        ),
        migrations.RemoveField(
            model_name='property',
            name='parent_property',
        ),
        migrations.AddField(
            model_name='edgelabel',
            name='schema',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='edges', to='designer.Schema'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='property',
            name='schema',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='properties', to='designer.Schema'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='vertexlabel',
            name='schema',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='vertices', to='designer.Schema'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='metaproperty',
            name='parent_property',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='meta_properties', to='designer.Property'),
        ),
    ]
