text: # -*- coding: utf-8 -*-
  # Generated by Django 1.10.3 on 2016-12-13 22:09
  from __future__ import unicode_literals
  
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('inventory', '0018_auto_20161213_1404'),
      ]
  
      operations = [
          migrations.CreateModel(
              name='CurrentMachineSnapshot',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('serial_number', models.TextField(db_index=True)),
              ],
          ),
          migrations.CreateModel(
              name='MachineSnapshotCommit',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('serial_number', models.TextField(db_index=True)),
                  ('version', models.PositiveIntegerField(default=1)),
                  ('created_at', models.DateTimeField(auto_now_add=True)),
              ],
          ),
          migrations.AddField(
              model_name='machinesnapshot',
              name='serial_number',
              field=models.TextField(db_index=True, default='0123456789'),
              preserve_default=False,
          ),
          migrations.AlterField(
              model_name='machinesnapshot',
              name='mt_hash',
              field=models.CharField(max_length=40, unique=True),
          ),
          migrations.AlterUniqueTogether(
              name='machinesnapshot',
              unique_together=set([]),
          ),
          migrations.AddField(
              model_name='machinesnapshotcommit',
              name='machine_snapshot',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.MachineSnapshot'),
          ),
          migrations.AddField(
              model_name='machinesnapshotcommit',
              name='parent',
              field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='inventory.MachineSnapshotCommit'),
          ),
          migrations.AddField(
              model_name='machinesnapshotcommit',
              name='source',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.Source'),
          ),
          migrations.AddField(
              model_name='currentmachinesnapshot',
              name='machine_snapshot',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.MachineSnapshot'),
          ),
          migrations.AddField(
              model_name='currentmachinesnapshot',
              name='source',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.Source'),
          ),
          migrations.RemoveField(
              model_name='machinesnapshot',
              name='archived_at',
          ),
          migrations.RemoveField(
              model_name='machinesnapshot',
              name='machine',
          ),
          migrations.RemoveField(
              model_name='machinesnapshot',
              name='mt_next',
          ),
          migrations.DeleteModel(
              name='Machine',
          ),
          migrations.AlterUniqueTogether(
              name='machinesnapshotcommit',
              unique_together=set([('serial_number', 'source', 'version')]),
          ),
          migrations.AlterUniqueTogether(
              name='currentmachinesnapshot',
              unique_together=set([('serial_number', 'source')]),
          ),
      ]
  