1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# Generated by Django 2.0.1 on 2018-01-26 14:56
import birds.models
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('birds', '0010_auto_20170906_2100'),
]
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=[(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=birds.models.get_upload_path)),
('image_credit', models.CharField(blank=True, max_length=200, null=True)),
],
options={
'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.AddField(
model_name='ap',
name='apclass',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='birds.APClass'),
),
]
|