# Generated by Django 3.0.4 on 2020-03-15 11:05

import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
import puddl.fields
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('puddl', '0002_device'),
        ('file', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='File',
            fields=[
                ('id', models.AutoField(auto_created=True,
                                        primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('last_modified', models.DateTimeField(auto_now=True)),
                ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)),
                ('path', puddl.fields.PathField()),
                ('filetype', django.contrib.postgres.fields.jsonb.JSONField(null=True)),
                ('stat', django.contrib.postgres.fields.jsonb.JSONField()),
                ('device', models.ForeignKey(
                    on_delete=django.db.models.deletion.CASCADE, to='puddl.Device')),
            ],
        ),
        migrations.AddConstraint(
            model_name='file',
            constraint=models.UniqueConstraint(
                fields=('device', 'path'), name='unique_device_path'),
        ),
    ]
