# -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2018-05-17 14:28
from __future__ import unicode_literals

import django.contrib.gis.db.models.fields
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Polygone',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('polygone', django.contrib.gis.db.models.fields.GeometryField(srid=4326)),
            ],
            options={
                'db_table': 'polygone',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='Projet',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nom', models.CharField(max_length=50)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('type', models.CharField(choices=[('O', 'OpenWeather'), ('N', 'Parcelle'), ('P', 'Plante')], max_length=1)),
                ('polygone', models.ManyToManyField(to='projet.Polygone')),
            ],
            options={
                'db_table': 'projet',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='Utilisateur',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nom', models.CharField(max_length=20)),
                ('prenom', models.CharField(max_length=20)),
                ('pseudo', models.CharField(max_length=20, unique=True)),
                ('mot_de_passe', models.CharField(max_length=33)),
                ('telephone', models.IntegerField()),
                ('email', models.CharField(max_length=40)),
                ('adresse', models.CharField(max_length=50)),
            ],
            options={
                'db_table': 'utilisateur',
                'managed': True,
            },
        ),
        migrations.AddField(
            model_name='projet',
            name='utilisateur',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='projet.Utilisateur'),
        ),
    ]
