# -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2017-08-03 14:54
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('wagtail_personalisation', '0012_remove_personalisablepagemetadata_is_segmented'),
        ('gem', '0019_change_setting_bbm_ga_account_to_bbm_ga_tracking_code'),
    ]

    operations = [
        migrations.CreateModel(
            name='ProfileDataRule',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('field', models.CharField(max_length=255)),
                ('operator', models.CharField(choices=[(b'lt', 'Less than'), (b'lte', 'Less than or equal'), (b'gt', 'Greater than'), (b'gte', 'Greater than or equal'), (b'eq', 'Equal'), (b'neq', 'Not equal'), (b'ol', 'Older than'), (b'ole', 'Older than or equal'), (b'yg', 'Younger than'), (b'yge', 'Younger than or equal'), (b'eqa', 'Of age'), (b'reg', 'Regex')], default=b'eq', help_text='Age operators work only on dates, please input the age you want to compare in "value". When using greater/less than on text field, it would compare it by alphabetical order, where dates are compared to the specified date by chronological order.', max_length=3)),
                ('value', models.CharField(help_text='If the selected field is a text field you can just input text. In case of dates, please use format "YYYY-MM-DD" and "YYYY-MM-DD HH:MM" for date-times. For regex please refer to the usage docs. If it is a choice field, please input anything, save and the error message displayed below this field should guide you with possible values.', max_length=255)),
                ('segment', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='gem_profiledatarule_related', related_query_name='%(app_label)s_%(class)ss', to='wagtail_personalisation.Segment')),
            ],
            options={
                'verbose_name': 'Profile Data Rule',
            },
        ),
    ]
