<reponame>WHOIGit/nes-lter-ims<filename>nlweb/api/migrations/0001_initial.py
# Generated by Django 2.2.2 on 2019-06-05 20:48

import django.contrib.gis.db.models.fields
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Cast',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('location', django.contrib.gis.db.models.fields.PointField(null=True, srid=4326)),
                ('number', models.IntegerField(null=True)),
                ('designation', models.CharField(max_length=64)),
                ('start_time', models.DateTimeField()),
                ('end_time', models.DateTimeField(null=True)),
                ('max_depth', models.FloatField(null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Cruise',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, unique=True)),
                ('start_time', models.DateTimeField(null=True)),
                ('end_time', models.DateTimeField(null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Niskin',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('location', django.contrib.gis.db.models.fields.PointField(null=True, srid=4326)),
                ('target_depth', models.FloatField(null=True)),
                ('target_depth_designation', models.CharField(max_length=64)),
                ('time', models.DateTimeField()),
                ('depth', models.FloatField()),
                ('cast', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='niskins', to='api.Cast')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Station',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('location', django.contrib.gis.db.models.fields.PointField(null=True, srid=4326)),
                ('name', models.CharField(max_length=64)),
                ('cruise', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='stations', to='api.Cruise')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Sample',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sample_id', models.CharField(max_length=64, null=True)),
                ('volume', models.FloatField(null=True)),
                ('niskins', models.ManyToManyField(to='api.Niskin')),
            ],
        ),
        migrations.AddField(
            model_name='cast',
            name='cruise',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='casts', to='api.Cruise'),
        ),
    ]

# Generated by Django 2.2.2 on 2019-06-05 20:48

import django.contrib.gis.db.models.fields
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Cast',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('location', django.contrib.gis.db.models.fields.PointField(null=True, srid=4326)),
                ('number', models.IntegerField(null=True)),
                ('designation', models.CharField(max_length=64)),
                ('start_time', models.DateTimeField()),
                ('end_time', models.DateTimeField(null=True)),
                ('max_depth', models.FloatField(null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Cruise',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, unique=True)),
                ('start_time', models.DateTimeField(null=True)),
                ('end_time', models.DateTimeField(null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Niskin',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('location', django.contrib.gis.db.models.fields.PointField(null=True, srid=4326)),
                ('target_depth', models.FloatField(null=True)),
                ('target_depth_designation', models.CharField(max_length=64)),
                ('time', models.DateTimeField()),
                ('depth', models.FloatField()),
                ('cast', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='niskins', to='api.Cast')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Station',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('location', django.contrib.gis.db.models.fields.PointField(null=True, srid=4326)),
                ('name', models.CharField(max_length=64)),
                ('cruise', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='stations', to='api.Cruise')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Sample',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sample_id', models.CharField(max_length=64, null=True)),
                ('volume', models.FloatField(null=True)),
                ('niskins', models.ManyToManyField(to='api.Niskin')),
            ],
        ),
        migrations.AddField(
            model_name='cast',
            name='cruise',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='casts', to='api.Cruise'),
        ),
    ]
# Generated by Django 2.2.2 on 2019-06-05 20:48