# Generated by Django 2.0.4 on 2018-12-05 19:51

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='LoggerData',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('time_date', models.DateTimeField(blank=True, null=True)),
                ('timezone', models.CharField(blank=True, max_length=5, null=True)),
                ('water_temp_c', models.FloatField(blank=True, null=True)),
                ('salinity', models.FloatField(blank=True, null=True)),
                ('pressure', models.FloatField(blank=True, null=True)),
                ('dissolved_o2', models.FloatField(blank=True, null=True)),
                ('sp_cond_ms', models.FloatField(blank=True, null=True)),
                ('spc_ms', models.FloatField(blank=True, null=True)),
                ('ph', models.FloatField(blank=True, null=True)),
                ('turbidiy', models.FloatField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='LoggerDeployment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_deployed', models.DateTimeField()),
                ('date_retrieved', models.DateTimeField(blank=True, null=True)),
                ('days_deployed', models.IntegerField(blank=True, null=True)),
                ('notes', models.TextField(blank=True, null=True)),
                ('last_modified', models.DateTimeField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Probe',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('manufacturer', models.CharField(max_length=255)),
                ('model', models.CharField(max_length=255)),
                ('uid', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='ProbeMeasurement',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('time_date', models.DateTimeField(blank=True, null=True)),
                ('timezone', models.CharField(blank=True, choices=[('AST', 'AST'), ('ADT', 'ADT'), ('UTC', 'UTC')], max_length=5, null=True)),
                ('tide_descriptor', models.CharField(blank=True, choices=[('eb', 'Ebb'), ('fl', 'Flood'), ('hi', 'High'), ('lo', 'Low')], max_length=2, null=True)),
                ('probe_depth', models.FloatField(blank=True, null=True)),
                ('water_temp_c', models.FloatField(blank=True, null=True)),
                ('salinity', models.FloatField(blank=True, null=True)),
                ('pressure', models.FloatField(blank=True, null=True)),
                ('dissolved_o2', models.FloatField(blank=True, null=True)),
                ('sp_cond_ms', models.FloatField(blank=True, null=True)),
                ('spc_ms', models.FloatField(blank=True, null=True)),
                ('ph', models.FloatField(blank=True, null=True)),
                ('turbidiy', models.FloatField(blank=True, null=True)),
                ('weather_notes', models.CharField(blank=True, max_length=1000, null=True)),
                ('probe', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='meq.Probe')),
            ],
        ),
        migrations.CreateModel(
            name='Province',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('province', models.CharField(blank=True, max_length=255, null=True)),
                ('abbrev', models.CharField(blank=True, max_length=10, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Sample',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_deployed', models.DateTimeField()),
                ('date_retrieved', models.DateTimeField(blank=True, null=True)),
                ('days_deployed', models.IntegerField(blank=True, null=True)),
                ('year', models.IntegerField(blank=True, null=True)),
                ('notes', models.TextField(blank=True, null=True)),
                ('last_modified', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'ordering': ['-year', 'station', '-date_deployed'],
            },
        ),
        migrations.CreateModel(
            name='Sampler',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(blank=True, max_length=255, null=True)),
                ('last_name', models.CharField(blank=True, max_length=255, null=True)),
                ('email', models.EmailField(blank=True, max_length=254, null=True)),
                ('phone', models.CharField(blank=True, max_length=25, null=True)),
                ('organization', models.CharField(blank=True, max_length=1000, null=True)),
            ],
            options={
                'ordering': ['first_name', 'last_name'],
            },
        ),
        migrations.CreateModel(
            name='Site',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=255, null=True)),
                ('site_desc', models.TextField(blank=True, null=True)),
                ('province', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='meq.Province')),
            ],
            options={
                'ordering': ['province', 'name'],
            },
        ),
        migrations.CreateModel(
            name='Station',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=255, null=True)),
                ('latitude_n', models.FloatField(blank=True, null=True)),
                ('longitude_w', models.FloatField(blank=True, null=True)),
                ('depth', models.FloatField(blank=True, null=True)),
                ('site_desc', models.TextField(blank=True, null=True)),
                ('site', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='stations', to='meq.Site')),
            ],
            options={
                'ordering': ['site', 'name'],
            },
        ),
        migrations.AddField(
            model_name='sample',
            name='samplers',
            field=models.ManyToManyField(to='meq.Sampler'),
        ),
        migrations.AddField(
            model_name='sample',
            name='station',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='samples', to='meq.Station'),
        ),
        migrations.AddField(
            model_name='probemeasurement',
            name='sample',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='probe_data', to='meq.Sample'),
        ),
        migrations.AddField(
            model_name='loggerdeployment',
            name='probe',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='meq.Probe'),
        ),
        migrations.AddField(
            model_name='loggerdeployment',
            name='sample',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='logger_deployments', to='meq.Sample'),
        ),
        migrations.AddField(
            model_name='loggerdata',
            name='logger_deployment',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='logger_data', to='meq.LoggerDeployment'),
        ),
    ]
