# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-06-03 01:23
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('users', '0012_auto_20170513_0710'),
        ('data', '0025_schema_auto_20170526_0028'),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomRecordSource',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('source_key', models.CharField(max_length=255)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('account', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='custom_record_sources', to='users.Account')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='custom_record_sources', to=settings.AUTH_USER_MODEL)),
                ('record', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='custom_record_sources', to='data.CustomRecord')),
                ('source', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='custom_record_sources', to='data.DataSource')),
                ('table', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='custom_record_sources', to='data.CustomTable')),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='customrecordsource',
            unique_together=set([('account', 'record', 'source')]),
        ),
    ]
