# -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-05-15 22:34
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Diapo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('index', models.CharField(max_length=128, verbose_name='Index de la diapo')),
                ('description', models.CharField(blank=True, max_length=1000)),
                ('chemin', models.CharField(blank=True, max_length=512, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Localisation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('numero', models.CharField(max_length=128)),
                ('type', models.CharField(choices=[('BD', 'BOITE DIAS'), ('NB2436', 'N&B 24.36'), ('NB66', 'N&B 6.6'), ('NBG', 'N&B Grands'), ('CC', 'CLASS. COUL')], max_length=6)),
            ],
        ),
        migrations.CreateModel(
            name='MotCle',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('mot', models.CharField(max_length=128, unique=True)),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='localisation',
            unique_together=set([('numero', 'type')]),
        ),
        migrations.AddField(
            model_name='diapo',
            name='localisation',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='photo.Localisation'),
        ),
        migrations.AddField(
            model_name='diapo',
            name='words',
            field=models.ManyToManyField(blank=True, to='photo.MotCle'),
        ),
        migrations.AlterUniqueTogether(
            name='diapo',
            unique_together=set([('localisation', 'index')]),
        ),
    ]
