# Generated by Django 2.0.1 on 2018-01-28 10:05 from django.conf import settings import django.contrib.gis.db.models.fields from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import sightings.models class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('photos', '0018_auto_20161130_1218'), ('locations', '0002_checkin'), ] operations = [ migrations.CreateModel( name='AP', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('common_name', models.CharField(max_length=200)), ('slug', models.SlugField()), ('scientific_name', models.CharField(max_length=200)), ('code', models.IntegerField(choices=[(0, 'unknown'), (1, 'regular occurring - common'), (2, 'regular occurring - less common'), (3, 'rare'), (4, 'casual'), (5, 'accidental'), (6, 'Cannot be found')], default=0)), ('image', models.FileField(blank=True, help_text='width of high res is 1360px', null=True, upload_to=sightings.models.get_upload_path)), ('image_credit', models.CharField(blank=True, max_length=200, null=True)), ], options={ 'verbose_name': 'Animal/Plant', 'verbose_name_plural': 'Animal/Plant', 'ordering': ['common_name'], }, ), migrations.CreateModel( name='APClass', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('common_name', models.CharField(max_length=200)), ('scientific_name', models.CharField(max_length=200)), ('kind', models.IntegerField(choices=[(1, 'Bird'), (2, 'Mammal'), (3, 'Reptile'), (4, 'Amphibian'), (5, 'Plant')], default=1)), ], options={ 'verbose_name_plural': 'Animal/Plant Class', 'ordering': ['kind', 'common_name'], }, ), migrations.CreateModel( name='Sighting', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('point', django.contrib.gis.db.models.fields.PointField(blank=True, srid=4326)), ('date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Date')), ('ap', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sightings.AP')), ('images', models.ManyToManyField(blank=True, to='photos.LuxImage')), ('location', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Location')), ('seen_by', models.ManyToManyField(to=settings.AUTH_USER_MODEL)), ], options={ 'ordering': ['-date'], }, ), migrations.AddField( model_name='ap', name='apclass', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sightings.APClass'), ), ]