# Generated by Django 2.1 on 2020-03-19 12:36

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


class Migration(migrations.Migration):

    dependencies = [
        ('app01', '0002_auto_20200313_0807'),
    ]

    operations = [
        migrations.CreateModel(
            name='Data',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('tmp', models.IntegerField(null=True)),
                ('hum', models.IntegerField(null=True)),
                ('pm10', models.IntegerField(null=True)),
                ('pm25', models.IntegerField(null=True)),
                ('time', models.CharField(max_length=32)),
            ],
        ),
        migrations.CreateModel(
            name='Site',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=32)),
            ],
        ),
        migrations.RenameField(
            model_name='register',
            old_name='devid',
            new_name='id',
        ),
        migrations.RenameField(
            model_name='register',
            old_name='siteid',
            new_name='name',
        ),
        migrations.AddField(
            model_name='data',
            name='device',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app01.Register'),
        ),
        migrations.AddField(
            model_name='register',
            name='site',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='app01.Site'),
        ),
    ]
