# Generated by Django 2.1.1 on 2019-02-19 20:46 from django.db import migrations, models from django.utils import timezone class Migration(migrations.Migration): dependencies = [ ('services', '0051_auto_20180602_1346'), ] operations = [ migrations.CreateModel( name='IPResourceState', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('date', models.DateTimeField(default=timezone.now)), ('state', models.IntegerField(choices=[(0, 'DOWN'), (1, 'UP'), (2, 'Inconnu')])), ('ip', models.ForeignKey(on_delete=models.deletion.CASCADE, related_name='state_set', to='services.IPResource')), ], ), migrations.AddField( model_name='ipresource', name='last_state', field=models.ForeignKey(null=True, on_delete=models.deletion.PROTECT, to='services.IPResourceState', related_name='+'), ), ]