# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-21 09:37
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='Connexion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField(db_index=True)),
                ('time', models.TimeField()),
                ('ip', models.CharField(max_length=50)),
            ],
            options={
                'db_table': 'connexions',
            },
        ),
        migrations.CreateModel(
            name='Editeur',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('libelle', models.CharField(max_length=250, unique=True)),
                ('slug', models.SlugField(unique=True)),
            ],
            options={
                'db_table': 'editeurs',
            },
        ),
        migrations.CreateModel(
            name='Lien',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('url', models.CharField(max_length=250, unique=True)),
                ('slug', models.SlugField(unique=True)),
            ],
            options={
                'db_table': 'liens',
            },
        ),
        migrations.CreateModel(
            name='Ressource',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('libelle', models.CharField(max_length=250, unique=True)),
                ('slug', models.SlugField(unique=True)),
                ('editeur', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='front.Editeur')),
            ],
            options={
                'db_table': 'ressources',
            },
        ),
        migrations.CreateModel(
            name='Utilisateur',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('hash', models.CharField(max_length=32)),
            ],
            options={
                'db_table': 'utilisateurs',
            },
        ),
        migrations.AddField(
            model_name='lien',
            name='ressource',
            field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='front.Ressource'),
        ),
        migrations.AddField(
            model_name='connexion',
            name='lien',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='front.Lien'),
        ),
        migrations.AddField(
            model_name='connexion',
            name='utilisateur',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='front.Utilisateur'),
        ),
    ]
