<reponame>rishab-rb/MyIOTMap<filename>server/api/migrations/0001_initial.py
# Generated by Django 2.0.7 on 2018-07-15 16:16

import api.helpers
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Device',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('uuid', models.CharField(default=api.helpers.GenerateUUID, max_length=128, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='DeviceData',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='KeyValue',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.CharField(max_length=200)),
                ('value', models.CharField(max_length=400)),
            ],
        ),
        migrations.AddField(
            model_name='devicedata',
            name='recieved',
            field=models.ManyToManyField(to='api.KeyValue'),
        ),
        migrations.AddField(
            model_name='device',
            name='data',
            field=models.ManyToManyField(to='api.DeviceData'),
        ),
        migrations.AddField(
            model_name='device',
            name='user',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]

# Generated by Django 2.0.7 on 2018-07-15 16:16

import api.helpers
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Device',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('uuid', models.CharField(default=api.helpers.GenerateUUID, max_length=128, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='DeviceData',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='KeyValue',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.CharField(max_length=200)),
                ('value', models.CharField(max_length=400)),
            ],
        ),
        migrations.AddField(
            model_name='devicedata',
            name='recieved',
            field=models.ManyToManyField(to='api.KeyValue'),
        ),
        migrations.AddField(
            model_name='device',
            name='data',
            field=models.ManyToManyField(to='api.DeviceData'),
        ),
        migrations.AddField(
            model_name='device',
            name='user',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
# Generated by Django 2.0.7 on 2018-07-15 16:16