text: # -*- coding: utf-8 -*-
  # Generated by Django 1.10.2 on 2017-03-29 06:54
  from __future__ import unicode_literals
  
  from django.db import migrations, models
  import django.db.models.deletion
  import squealy.models
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
      ]
  
      operations = [
          migrations.CreateModel(
              name='Account',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=250)),
              ],
          ),
          migrations.CreateModel(
              name='Chart',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('url', models.CharField(max_length=255, unique=True)),
                  ('query', models.TextField()),
                  ('name', models.CharField(max_length=255)),
                  ('format', models.CharField(default='GoogleChartsFormatter', max_length=50)),
                  ('type', models.CharField(default='ColumnChart', max_length=20)),
                  ('options', squealy.models.CustomJSONField(blank=True, null=True)),
                  ('database', models.CharField(blank=True, max_length=100, null=True)),
                  ('account', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='squealy.Account')),
              ],
          ),
          migrations.CreateModel(
              name='Parameter',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=100)),
                  ('data_type', models.CharField(default='string', max_length=100)),
                  ('mandatory', models.BooleanField(default=True)),
                  ('default_value', models.CharField(blank=True, max_length=200, null=True)),
                  ('test_value', models.CharField(blank=True, max_length=200, null=True)),
                  ('type', models.IntegerField(choices=[(1, b'query'), (2, b'user')], default=1)),
                  ('kwargs', squealy.models.CustomJSONField(blank=True, default={}, null=True)),
                  ('chart', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='parameters', to='squealy.Chart')),
              ],
          ),
          migrations.CreateModel(
              name='ReportParameter',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('parameter_name', models.CharField(max_length=300)),
                  ('parameter_value', models.CharField(max_length=300)),
              ],
          ),
          migrations.CreateModel(
              name='ReportRecipient',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('email', models.EmailField(max_length=254)),
              ],
          ),
          migrations.CreateModel(
              name='ScheduledReport',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('subject', models.CharField(max_length=200)),
                  ('last_run_at', models.DateTimeField(blank=True, null=True)),
                  ('next_run_at', models.DateTimeField(blank=True, null=True)),
                  ('cron_expression', models.CharField(max_length=200)),
                  ('chart', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='scheduled_report', to='squealy.Chart')),
              ],
          ),
          migrations.CreateModel(
              name='Transformation',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.IntegerField(choices=[(1, b'Transpose'), (2, b'Split'), (3, b'Merge')], default=1)),
                  ('kwargs', squealy.models.CustomJSONField(blank=True, default={}, null=True)),
                  ('chart', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='transformations', to='squealy.Chart')),
              ],
          ),
          migrations.CreateModel(
              name='Validation',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('query', models.TextField()),
                  ('name', models.CharField(max_length=200)),
                  ('chart', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='validations', to='squealy.Chart')),
              ],
          ),
          migrations.AddField(
              model_name='reportrecipient',
              name='report',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reportrecep', to='squealy.ScheduledReport'),
          ),
          migrations.AddField(
              model_name='reportparameter',
              name='report',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reportparam', to='squealy.ScheduledReport'),
          ),
      ]
  