text: # Generated by Django 2.2.4 on 2020-07-17 14:55
  
  import datetime
  from django.conf import settings
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
          migrations.swappable_dependency(settings.AUTH_USER_MODEL),
      ]
  
      operations = [
          migrations.CreateModel(
              name='ResultCooperator',
              fields=[
                  ('site_name', models.CharField(max_length=128, verbose_name='Site')),
                  ('usgs_scode', models.CharField(max_length=128, verbose_name='USGS Station ID')),
                  ('sample_date_time', models.DateTimeField(verbose_name='Sample Date Time')),
                  ('medium', models.CharField(max_length=128, verbose_name='Medium')),
                  ('length', models.CharField(max_length=128, verbose_name='Sample Length (m)')),
                  ('depth', models.CharField(max_length=128, verbose_name='Sample Depth (m)')),
                  ('analysis_date', models.DateField(max_length=128, verbose_name='Analysis Date')),
                  ('result_id', models.IntegerField(verbose_name='Results ID')),
                  ('bottle', models.CharField(max_length=128, verbose_name='Bottle ID')),
                  ('constituent', models.CharField(max_length=128, verbose_name='Parameter')),
                  ('final_ddl', models.CharField(max_length=128, verbose_name='DDL (output)')),
                  ('detection_flag', models.CharField(max_length=128, verbose_name='D-Flag (output)')),
                  ('final_value', models.CharField(max_length=128, verbose_name='Value')),
                  ('unit', models.CharField(max_length=128, verbose_name='Units')),
                  ('sample_id', models.IntegerField(verbose_name='Field ID')),
                  ('analysis_comment', models.TextField(verbose_name='Analysis Comment')),
                  ('sample_comment', models.TextField(verbose_name='Sample Comment')),
                  ('qaflags', models.CharField(max_length=128, verbose_name='ALL QA FLAGS')),
                  ('entry_date', models.DateField()),
                  ('project_name', models.CharField(max_length=128)),
                  ('cooperator_name', models.CharField(max_length=128)),
                  ('row_num', models.IntegerField(primary_key=True, serialize=False)),
              ],
              options={
                  'db_table': 'report_cooperator_results',
                  'managed': False,
              },
          ),
          migrations.CreateModel(
              name='ResultCountNawqa',
              fields=[
                  ('project_name', models.CharField(max_length=128)),
                  ('site_name', models.CharField(max_length=128)),
                  ('entry_date', models.DateField()),
                  ('row_num', models.IntegerField(primary_key=True, serialize=False)),
              ],
              options={
                  'db_table': 'report_nawqa_results_count',
                  'managed': False,
              },
          ),
          migrations.CreateModel(
              name='ResultCountProjects',
              fields=[
                  ('project_name', models.CharField(max_length=128)),
                  ('nwis_customer_code', models.CharField(max_length=128)),
                  ('null', models.CharField(max_length=8)),
                  ('cooperator_email', models.EmailField(max_length=254)),
                  ('entry_date', models.DateField()),
                  ('row_num', models.IntegerField(primary_key=True, serialize=False)),
              ],
              options={
                  'db_table': 'report_projects_results_count',
                  'managed': False,
              },
          ),
          migrations.CreateModel(
              name='ResultNwis',
              fields=[
                  ('sample_integer', models.IntegerField()),
                  ('parameter_cd', models.CharField(max_length=128)),
                  ('result_value', models.CharField(max_length=128)),
                  ('remark_cd', models.CharField(max_length=128)),
                  ('qa_cd', models.CharField(max_length=8)),
                  ('qw_method_cd', models.CharField(max_length=8)),
                  ('results_rd', models.CharField(max_length=8)),
                  ('val_qual_cd', models.TextField()),
                  ('rpt_lev_value', models.FloatField()),
                  ('rpt_lev_cd', models.CharField(max_length=8)),
                  ('dqi_cd', models.CharField(max_length=8)),
                  ('null_val_qual', models.CharField(max_length=8)),
                  ('prep_set_no', models.CharField(max_length=8)),
                  ('anl_set_no', models.CharField(max_length=8)),
                  ('anl_dt', models.CharField(max_length=8)),
                  ('prep_dt', models.CharField(max_length=8)),
                  ('lab_result_comment', models.TextField()),
                  ('field_result_comment', models.CharField(max_length=8)),
                  ('lab_std_dev', models.CharField(max_length=8)),
                  ('anl_ent', models.CharField(max_length=8)),
                  ('entry_date', models.DateField()),
                  ('project_name', models.CharField(max_length=128)),
                  ('row_num', models.IntegerField(primary_key=True, serialize=False)),
              ],
              options={
                  'db_table': 'report_nwis_results_ld',
                  'managed': False,
              },
          ),
          migrations.CreateModel(
              name='SampleNwis',
              fields=[
                  ('sample_integer', models.IntegerField()),
                  ('user_code', models.CharField(max_length=128)),
                  ('agency_cd', models.CharField(max_length=8)),
                  ('site_no', models.CharField(max_length=128)),
                  ('sample_start_date', models.CharField(max_length=128)),
                  ('sample_end_date', models.CharField(max_length=8)),
                  ('medium_cd', models.CharField(max_length=128)),
                  ('lab_id', models.CharField(max_length=8)),
                  ('project_cd', models.CharField(max_length=8)),
                  ('aqfr_cd', models.CharField(max_length=8)),
                  ('sample_type', models.CharField(max_length=8)),
                  ('anl_start_cd', models.CharField(max_length=8)),
                  ('anl_src_cd', models.CharField(max_length=8)),
                  ('hyd_cond_cd', models.CharField(max_length=8)),
                  ('hyd_event_cd', models.CharField(max_length=8)),
                  ('tissue_id', models.CharField(max_length=8)),
                  ('body_part_cd', models.CharField(max_length=8)),
                  ('lab_smp_comment', models.CharField(max_length=8)),
                  ('field_smp_comment', models.TextField()),
                  ('sample_tz_cd', models.CharField(max_length=8)),
                  ('tm_datum_rlblty_cd', models.CharField(max_length=8)),
                  ('coll_agency_cd', models.CharField(max_length=8)),
                  ('entry_date', models.DateField()),
                  ('project_name', models.CharField(max_length=128)),
                  ('row_num', models.IntegerField(primary_key=True, serialize=False)),
              ],
              options={
                  'db_table': 'report_nwis_samples',
                  'managed': False,
              },
          ),
          migrations.CreateModel(
              name='Acid',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('code', models.CharField(max_length=128, unique=True)),
                  ('concentration', models.FloatField(default=-999)),
                  ('comment', models.TextField(blank=True)),
                  ('created_date', models.DateField(blank=True, db_index=True, default=datetime.datetime.now, null=True)),
                  ('modified_date', models.DateField(auto_now=True, null=True)),
              ],
              options={
                  'db_table': 'mercury_acid',
                  'ordering': ['-created_date', '-id'],
              },
          ),
          migrations.CreateModel(
              name='AnalysisConstituent',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
              ],
              options={
                  'db_table': 'mercury_analysisconstituent',
                  'ordering': ['-id'],
              },
          ),
          migrations.CreateModel(
              name='AnalysisMedium',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
              ],
              options={
                  'db_table': 'mercury_analysismedium',
                  'ordering': ['-id'],
              },
          ),
          migrations.CreateModel(
              name='AnalysisMethod',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
              ],
              options={
                  'db_table': 'mercury_analysismethod',
              },
          ),
          migrations.CreateModel(
              name='AnalysisType',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('analysis', models.CharField(max_length=128, unique=True)),
                  ('description', models.TextField(blank=True)),
              ],
              options={
                  'db_table': 'mercury_analysistype',
                  'ordering': ['-id'],
              },
          ),
          migrations.CreateModel(
              name='BlankWater',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('lot_number', models.CharField(max_length=128, unique=True)),
                  ('concentration', models.FloatField(default=-999)),
                  ('comment', models.TextField(blank=True)),
                  ('created_date', models.DateField(blank=True, db_index=True, default=datetime.datetime.now, null=True)),
                  ('modified_date', models.DateField(auto_now=True, null=True)),
              ],
              options={
                  'db_table': 'mercury_blankwater',
                  'ordering': ['-created_date', '-id'],
              },
          ),
          migrations.CreateModel(
              name='Bottle',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('bottle_unique_name', models.CharField(max_length=128, unique=True)),
                  ('tare_weight', models.DecimalField(decimal_places=5, max_digits=9, null=True)),
                  ('description', models.TextField(blank=True)),
                  ('created_date', models.DateField(blank=True, db_index=True, default=datetime.datetime.now, null=True)),
                  ('modified_date', models.DateField(auto_now=True, null=True)),
              ],
              options={
                  'db_table': 'mercury_bottle',
                  'ordering': ['-created_date', '-id'],
              },
          ),
          migrations.CreateModel(
              name='BottleType',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('bottle_type', models.CharField(max_length=128, unique=True)),
                  ('description', models.TextField(blank=True)),
              ],
              options={
                  'db_table': 'mercury_bottletype',
                  'ordering': ['-id'],
              },
          ),
          migrations.CreateModel(
              name='Bromination',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('concentration', models.FloatField()),
                  ('comment', models.TextField(blank=True)),
                  ('created_date', models.DateField(blank=True, db_index=True, default=datetime.datetime.now, null=True)),
                  ('modified_date', models.DateField(auto_now=True, null=True)),
              ],
              options={
                  'db_table': 'mercury_bromination',
                  'ordering': ['-created_date', '-id'],
              },
          ),
          migrations.CreateModel(
              name='ConstituentType',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('constituent', models.CharField(max_length=128, unique=True)),
                  ('description', models.TextField(blank=True)),
                  ('analyses', models.ManyToManyField(related_name='constituents', through='merlinservices.AnalysisConstituent', to='merlinservices.AnalysisType')),
              ],
              options={
                  'db_table': 'mercury_constituenttype',
                  'ordering': ['-id'],
              },
          ),
          migrations.CreateModel(
              name='Cooperator',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=128)),
                  ('agency', models.CharField(max_length=128)),
                  ('email', models.EmailField(blank=True, max_length=254)),
                  ('phone', models.BigIntegerField(blank=True, null=True)),
                  ('sec_phone', models.BigIntegerField(blank=True, null=True)),
                  ('address', models.CharField(blank=True, max_length=128)),
                  ('city', models.CharField(blank=True, max_length=128)),
                  ('state', models.CharField(blank=True, max_length=2)),
                  ('zipcode', models.BigIntegerField(blank=True, null=True)),
                  ('country', models.CharField(blank=True, max_length=128)),
              ],
              options={
                  'db_table': 'mercury_cooperator',
                  'ordering': ['-id'],
                  'unique_together': {('name', 'agency')},
              },
          ),
          migrations.CreateModel(
              name='DetectionFlag',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('detection_flag', models.CharField(max_length=128, unique=True)),
                  ('description', models.TextField(blank=True)),
              ],
              options={
                  'db_table': 'mercury_detectionflag',
                  'ordering': ['-id'],
              },
          ),
          migrations.CreateModel(
              name='FilterType',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('filter', models.CharField(max_length=128, unique=True)),
                  ('description', models.TextField(blank=True)),
              ],
              options={
                  'db_table': 'mercury_filtertype',
                  'ordering': ['-id'],
              },
          ),
          migrations.CreateModel(
              name='IsotopeFlag',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('isotope_flag', models.CharField(max_length=128, unique=True)),
                  ('description', models.TextField(blank=True)),
              ],
              options={
                  'db_table': 'mercury_isotopeflag',
                  'ordering': ['-id'],
              },
          ),
          migrations.CreateModel(
              name='MediumType',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('nwis_code', models.CharField(blank=True, max_length=128, unique=True)),
                  ('nwis_code_qa', models.CharField(blank=True, max_length=128)),
                  ('medium', models.CharField(max_length=128, unique=True)),
                  ('description', models.TextField(blank=True)),
                  ('comment', models.TextField(blank=True)),
              ],
              options={
                  'db_table': 'mercury_mediumtype',
                  'ordering': ['-id'],
              },
          ),
          migrations.CreateModel(
              name='MethodType',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('method', models.CharField(max_length=128, unique=True)),
                  ('method_code', models.IntegerField(unique=True)),
                  ('preparation', models.CharField(blank=True, max_length=128)),
                  ('description', models.TextField(blank=True)),
                  ('method_detection_limit', models.FloatField(blank=True, null=True)),
                  ('decimal_places', models.IntegerField(blank=True, null=True)),
                  ('significant_figures', models.IntegerField(blank=True, null=True)),
                  ('standard_operating_procedure', models.TextField(blank=True)),
                  ('nwis_parameter_code', models.CharField(blank=True, max_length=128)),
                  ('nwis_parameter_name', models.CharField(blank=True, max_length=128)),
                  ('nwis_method_code', models.CharField(blank=True, max_length=128)),
              ],
              options={
                  'db_table': 'mercury_methodtype',
                  'ordering': ['-id'],
              },
          ),
          migrations.CreateModel(
              name='PreservationType',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('preservation', models.CharField(max_length=128, unique=True)),
                  ('description', models.TextField(blank=True)),
              ],
              options={
                  'db_table': 'mercury_preservationtype',
                  'ordering': ['-id'],
              },
          ),
          migrations.CreateModel(
              name='ProcessingType',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('processing', models.CharField(max_length=128, unique=True)),
                  ('description', models.TextField(blank=True)),
              ],
              options={
                  'db_table': 'mercury_processingtype',
                  'ordering': ['-id'],
              },
          ),
          migrations.CreateModel(
              name='Project',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=128, unique=True)),
                  ('description', models.CharField(blank=True, max_length=128)),
                  ('accounting_code', models.CharField(blank=True, max_length=128)),
                  ('cooperator', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='projects', to='merlinservices.Cooperator')),
              ],
              options={
                  'db_table': 'mercury_project',
                  'ordering': ['-id'],
              },
          ),
          migrations.CreateModel(
              name='ProjectSite',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='merlinservices.Project')),
              ],
              options={
                  'db_table': 'mercury_projectsite',
                  'ordering': ['-id'],
              },
          ),
          migrations.CreateModel(
              name='QualityAssuranceType',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('quality_assurance', models.CharField(max_length=128, unique=True)),
                  ('description', models.TextField(blank=True)),
                  ('nwis_value_qualifier', models.CharField(blank=True, max_length=128)),
                  ('nwis_value_qualifier_comment', models.TextField(blank=True)),
              ],
              options={
                  'db_table': 'mercury_qualityassurancetype',
                  'ordering': ['-id'],
              },
          ),
          migrations.CreateModel(
              name='Result',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('raw_value', models.FloatField(blank=True, null=True)),
                  ('final_value', models.FloatField(blank=True, null=True)),
                  ('report_value', models.CharField(blank=True, max_length=128, null=True)),
                  ('raw_daily_detection_limit', models.FloatField(blank=True, null=True)),
                  ('final_daily_detection_limit', models.FloatField(blank=True, null=True)),
                  ('final_method_detection_limit', models.FloatField(blank=True, null=True)),
                  ('sediment_dry_weight', models.FloatField(blank=True, max_length=128, null=True)),
                  ('sample_mass_processed', models.FloatField(blank=True, max_length=128, null=True)),
                  ('entry_date', models.DateField(blank=True, null=True)),
                  ('analyzed_date', models.DateField(blank=True, null=True)),
                  ('analysis_comment', models.TextField(blank=True, null=True)),
                  ('created_date', models.DateField(blank=True, default=datetime.datetime.now, null=True)),
                  ('modified_date', models.DateField(auto_now=True, null=True)),
                  ('analysis', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='merlinservices.AnalysisType')),
                  ('constituent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='merlinservices.ConstituentType')),
                  ('detection_flag', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='merlinservices.DetectionFlag')),
                  ('isotope_flag', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='merlinservices.IsotopeFlag')),
                  ('method', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='merlinservices.MethodType')),
              ],
              options={
                  'db_table': 'mercury_result',
                  'ordering': ['-id'],
              },
          ),
          migrations.CreateModel(
              name='Sample',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('sample_date_time', models.DateTimeField()),
                  ('depth', models.FloatField()),
                  ('length', models.FloatField(blank=True, null=True)),
                  ('comment', models.TextField(blank=True)),
                  ('received_date', models.DateField(blank=True, null=True)),
                  ('replicate', models.IntegerField(blank=True, null=True)),
                  ('created_date', models.DateField(blank=True, default=datetime.datetime.now, null=True)),
                  ('modified_date', models.DateField(auto_now=True, null=True)),
                  ('lab_processing', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='merlinservices.ProcessingType')),
                  ('medium_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='merlinservices.MediumType')),
                  ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='merlinservices.Project')),
              ],
              options={
                  'db_table': 'mercury_sample',
                  'ordering': ['-id'],
              },
          ),
          migrations.CreateModel(
              name='SampleBottle',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('volume_filtered', models.FloatField(blank=True, null=True)),
                  ('preservation_volume', models.FloatField(blank=True, null=True)),
                  ('preservation_comment', models.TextField(blank=True)),
                  ('created_date', models.DateField(blank=True, default=datetime.datetime.now, null=True)),
                  ('modified_date', models.DateField(auto_now=True, null=True)),
                  ('bottle', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='sample_bottles', to='merlinservices.Bottle')),
                  ('filter_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='merlinservices.FilterType')),
                  ('preservation_acid', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='merlinservices.Acid')),
                  ('preservation_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='merlinservices.PreservationType')),
                  ('sample', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='sample_bottles', to='merlinservices.Sample')),
              ],
              options={
                  'db_table': 'mercury_samplebottle',
                  'unique_together': {('sample', 'bottle')},
              },
          ),
          migrations.CreateModel(
              name='TempBottle',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('bottle_id', models.CharField(max_length=128)),
                  ('sort_id', models.IntegerField()),
              ],
              options={
                  'db_table': 'mercury_tempbottle',
              },
          ),
          migrations.CreateModel(
              name='TempBottle2',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('bottle_id', models.CharField(max_length=128)),
                  ('sort_id', models.IntegerField()),
              ],
              options={
                  'db_table': 'mercury_tempbottle2',
              },
          ),
          migrations.CreateModel(
              name='UnitType',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('unit', models.CharField(max_length=128, unique=True)),
                  ('description', models.TextField(blank=True)),
              ],
              options={
                  'db_table': 'mercury_unittype',
                  'ordering': ['-id'],
              },
          ),
          migrations.CreateModel(
              name='UserProfile',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('initials', models.CharField(blank=True, max_length=6)),
                  ('phone', models.BigIntegerField(blank=True, null=True)),
                  ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
              ],
              options={
                  'db_table': 'mercury_userprofile',
                  'ordering': ['-id'],
              },
          ),
          migrations.CreateModel(
              name='Site',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=128)),
                  ('usgs_sid', models.CharField(blank=True, max_length=128)),
                  ('usgs_scode', models.CharField(blank=True, max_length=128)),
                  ('description', models.TextField(blank=True)),
                  ('latitude', models.DecimalField(blank=True, decimal_places=10, max_digits=12, null=True)),
                  ('longitude', models.DecimalField(blank=True, decimal_places=10, max_digits=13, null=True)),
                  ('datum', models.CharField(blank=True, max_length=128)),
                  ('method', models.CharField(blank=True, max_length=128)),
                  ('site_status', models.CharField(blank=True, max_length=128)),
                  ('nwis_customer_code', models.CharField(blank=True, max_length=128)),
                  ('projects', models.ManyToManyField(related_name='sites', through='merlinservices.ProjectSite', to='merlinservices.Project')),
              ],
              options={
                  'db_table': 'mercury_site',
                  'ordering': ['-id'],
              },
          ),
          migrations.AddField(
              model_name='sample',
              name='site',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='merlinservices.Site'),
          ),
          migrations.CreateModel(
              name='ResultDataFile',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=128, unique=True)),
                  ('file', models.FileField(upload_to='')),
                  ('uploaded_date', models.DateField(auto_now_add=True, null=True)),
                  ('result', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='result_data_files', to='merlinservices.Result')),
              ],
              options={
                  'db_table': 'mercury_resultdatafile',
                  'ordering': ['-id'],
              },
          ),
          migrations.AddField(
              model_name='result',
              name='sample_bottle',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='results', to='merlinservices.SampleBottle'),
          ),
          migrations.AddField(
              model_name='projectsite',
              name='site',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='merlinservices.Site'),
          ),
          migrations.AddField(
              model_name='methodtype',
              name='final_value_unit',
              field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='final_unit', to='merlinservices.UnitType'),
          ),
          migrations.AddField(
              model_name='methodtype',
              name='method_detection_limit_unit',
              field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='mdl_unit', to='merlinservices.UnitType'),
          ),
          migrations.AddField(
              model_name='methodtype',
              name='raw_value_unit',
              field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='raw_unit', to='merlinservices.UnitType'),
          ),
          migrations.CreateModel(
              name='BottlePrefix',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('bottle_prefix', models.CharField(max_length=128, unique=True)),
                  ('description', models.TextField(blank=True)),
                  ('created_date', models.DateField(blank=True, db_index=True, default=datetime.datetime.now, null=True)),
                  ('modified_date', models.DateField(auto_now=True, null=True)),
                  ('bottle_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='merlinservices.BottleType')),
              ],
              options={
                  'db_table': 'mercury_bottleprefix',
                  'ordering': ['-created_date', '-id'],
              },
          ),
          migrations.AddField(
              model_name='bottle',
              name='bottle_prefix',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='merlinservices.BottlePrefix'),
          ),
          migrations.AddField(
              model_name='analysistype',
              name='mediums',
              field=models.ManyToManyField(related_name='analyses', through='merlinservices.AnalysisMedium', to='merlinservices.MediumType'),
          ),
          migrations.AddField(
              model_name='analysistype',
              name='methods',
              field=models.ManyToManyField(related_name='analyses', through='merlinservices.AnalysisMethod', to='merlinservices.MethodType'),
          ),
          migrations.AddField(
              model_name='analysismethod',
              name='analysis_type',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='merlinservices.AnalysisType'),
          ),
          migrations.AddField(
              model_name='analysismethod',
              name='method_type',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='merlinservices.MethodType'),
          ),
          migrations.AddField(
              model_name='analysismedium',
              name='analysis_type',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='merlinservices.AnalysisType'),
          ),
          migrations.AddField(
              model_name='analysismedium',
              name='medium_type',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='merlinservices.MediumType'),
          ),
          migrations.AddField(
              model_name='analysisconstituent',
              name='analysis',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='merlinservices.AnalysisType'),
          ),
          migrations.AddField(
              model_name='analysisconstituent',
              name='constituent',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='merlinservices.ConstituentType'),
          ),
          migrations.CreateModel(
              name='SampleBottleBromination',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('bromination_event', models.IntegerField(blank=True, null=True)),
                  ('bromination_volume', models.FloatField(blank=True, null=True)),
                  ('created_date', models.DateField(blank=True, db_index=True, default=datetime.datetime.now, null=True)),
                  ('modified_date', models.DateField(auto_now=True, null=True)),
                  ('bromination', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='merlinservices.Bromination')),
                  ('sample_bottle', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='merlinservices.SampleBottle')),
              ],
              options={
                  'db_table': 'mercury_samplebottlebromination',
                  'ordering': ['-created_date', '-id'],
                  'unique_together': {('sample_bottle', 'bromination', 'bromination_event')},
              },
          ),
          migrations.AlterUniqueTogether(
              name='sample',
              unique_together={('project', 'site', 'sample_date_time', 'depth', 'length', 'replicate', 'medium_type')},
          ),
          migrations.AlterUniqueTogether(
              name='result',
              unique_together={('sample_bottle', 'analysis', 'constituent', 'isotope_flag')},
          ),
          migrations.CreateModel(
              name='QualityAssurance',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('quality_assurance', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='merlinservices.QualityAssuranceType')),
                  ('result', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='quality_assurances', to='merlinservices.Result')),
              ],
              options={
                  'db_table': 'mercury_qualityassurance',
                  'ordering': ['-id'],
                  'unique_together': {('quality_assurance', 'result')},
              },
          ),
          migrations.AlterUniqueTogether(
              name='projectsite',
              unique_together={('project', 'site')},
          ),
          migrations.AlterUniqueTogether(
              name='analysismethod',
              unique_together={('analysis_type', 'method_type')},
          ),
          migrations.AlterUniqueTogether(
              name='analysismedium',
              unique_together={('analysis_type', 'medium_type')},
          ),
          migrations.AlterUniqueTogether(
              name='analysisconstituent',
              unique_together={('analysis', 'constituent')},
          ),
      ]
  