# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-04-17 08:53
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('users', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Device',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('device_model', models.CharField(max_length=50, null=True)),
                ('os', models.CharField(max_length=50, null=True)),
                ('os_version', models.CharField(max_length=50, null=True)),
                ('device_id', models.CharField(max_length=50, null=True)),
                ('app_version', models.CharField(max_length=50, null=True)),
                ('notification_token', models.CharField(max_length=300, null=True)),
                ('state', models.IntegerField(blank=True, choices=[(1, 'ACTIVE'), (2, 'INACTIVE'), (3, 'UNINSTALLED'), (4, 'INVALID')], default=1, null=True)),
                ('last_seen', models.IntegerField(blank=True, null=True)),
                ('unique_hash', models.CharField(max_length=40, null=True, unique=True)),
            ],
        ),
        migrations.RenameField(
            model_name='user',
            old_name='device_token',
            new_name='device_id',
        ),
        migrations.RemoveField(
            model_name='user',
            name='uuid',
        ),
        migrations.AddField(
            model_name='user',
            name='latitude',
            field=models.DecimalField(blank=True, decimal_places=7, max_digits=12, null=True),
        ),
        migrations.AddField(
            model_name='user',
            name='longitude',
            field=models.DecimalField(blank=True, decimal_places=7, max_digits=12, null=True),
        ),
        migrations.AddField(
            model_name='device',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='devices', to='users.User'),
        ),
    ]
