0001_initial.py 1.89 KB
Newer Older
1
# -*- coding: utf-8 -*-
Nicolas Noé's avatar
Nicolas Noé committed
2
# Generated by Django 1.11.2 on 2017-06-14 13:02
3
4
5
from __future__ import unicode_literals

from django.db import migrations, models
Nicolas Noé's avatar
Nicolas Noé committed
6
import django.db.models.deletion
7
8
9
10
11
12
13
14
15
16


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
Nicolas Noé's avatar
Nicolas Noé committed
17
18
19
20
21
22
23
24
        migrations.CreateModel(
            name='Person',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=100)),
                ('last_name', models.CharField(max_length=100)),
            ],
        ),
25
26
27
28
        migrations.CreateModel(
            name='Specimen',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
Nicolas Noé's avatar
Nicolas Noé committed
29
30
31
32
33
34
35
36
37
38
39
40
                ('specimen_id', models.IntegerField(unique=True)),
                ('scientific_name', models.CharField(max_length=100)),
                ('depth', models.IntegerField(blank=True, null=True)),
                ('comment', models.TextField(blank=True, null=True)),
                ('identified_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='specimens.Person')),
            ],
        ),
        migrations.CreateModel(
            name='SpecimenLocation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
41
42
            ],
        ),
Nicolas Noé's avatar
Nicolas Noé committed
43
44
45
46
47
48
49
50
51
        migrations.AddField(
            model_name='specimen',
            name='location',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='specimens.SpecimenLocation'),
        ),
        migrations.AlterUniqueTogether(
            name='person',
            unique_together=set([('first_name', 'last_name')]),
        ),
52
    ]