# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-01-06 13:47
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('pootle_store', '0023_add_unit_store_idxs'),
    ]

    operations = [
        migrations.CreateModel(
            name='Stem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('root', models.CharField(max_length=255, unique=True)),
            ],
            options={
                'abstract': False,
                'db_table': 'pootle_word_stem',
            },
        ),
        migrations.CreateModel(
            name='UnitStem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('stem', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pootle_word.Stem')),
                ('unit', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pootle_store.Unit')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='stem',
            name='units',
            field=models.ManyToManyField(related_name='stems', through='pootle_word.UnitStem', to='pootle_store.Unit'),
        ),
        migrations.AlterUniqueTogether(
            name='unitstem',
            unique_together=set([('stem', 'unit')]),
        ),
    ]
