# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-17 14:22
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import pootle.core.user


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('pootle_store', '0033_conditionally_remove_unit_created_by'),
    ]

    operations = [
        migrations.CreateModel(
            name='UnitSource',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_with', models.IntegerField(db_index=True, default=5)),
                ('created_by', models.ForeignKey(default=pootle.core.user.get_system_user_id, on_delete=models.SET(pootle.core.user.get_system_user), related_name='created_units', to=settings.AUTH_USER_MODEL)),
                ('unit', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='unit_source', to='pootle_store.Unit', unique=True)),
            ],
            options={
                'abstract': False,
                'db_table': 'pootle_store_unit_source',
            },
        ),
    ]
