diff --git a/ccdb/experiments/migrations/0003_DATA_reset_sequences.py b/ccdb/experiments/migrations/0003_DATA_reset_sequences.py new file mode 100644 index 0000000..9f5d9d6 --- /dev/null +++ b/ccdb/experiments/migrations/0003_DATA_reset_sequences.py @@ -0,0 +1,70 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.8 on 2017-12-18 12:53 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('experiments', '0002_DATA_initial'), + ] + + operations = [ + migrations.RunSQL( + "SELECT setval('experiments_flaw_id_seq', (" + "SELECT MAX(id)+1 FROM experiments_flaw), false)", + + "SELECT setval('experiments_flaw_id_seq', 1, false)" + ), + + migrations.RunSQL( + "SELECT setval('experiments_experiment_id_seq', (" + "SELECT MAX(id)+1 FROM experiments_experiment), false)", + + "SELECT setval('experiments_experiment_id_seq', 1, false)" + ), + + migrations.RunSQL( + "SELECT setval('experiments_protocolattachment_id_seq', (" + "SELECT MAX(id)+1 FROM experiments_protocolattachment), false)", + + "SELECT setval('experiments_protocolattachment_id_seq', 1, false)" + ), + + migrations.RunSQL( + "SELECT setval('experiments_treatmenttype_id_seq', (" + "SELECT MAX(id)+1 FROM experiments_treatmenttype), false)", + + "SELECT setval('experiments_treatmenttype_id_seq', 1, false)" + ), + + migrations.RunSQL( + "SELECT setval('experiments_treatment_id_seq', (" + "SELECT MAX(id)+1 FROM experiments_treatment), false)", + + "SELECT setval('experiments_treatment_id_seq', 1, false)" + ), + + migrations.RunSQL( + "SELECT setval('experiments_treatment_id_seq', (" + "SELECT MAX(id)+1 FROM experiments_treatment), false)", + + "SELECT setval('experiments_treatment_id_seq', 1, false)" + ), + + migrations.RunSQL( + "SELECT setval('experiments_treatmentreplicate_id_seq', (" + "SELECT MAX(id)+1 FROM experiments_treatmentreplicate), false)", + + "SELECT setval('experiments_treatmentreplicate_id_seq', 1, false)" + ), + + migrations.RunSQL( + "SELECT setval('experiments_alivedeadcount_id_seq', (" + "SELECT MAX(id)+1 FROM experiments_alivedeadcount), false)", + + "SELECT setval('experiments_alivedeadcount_id_seq', 1, false)" + ), + ] diff --git a/ccdb/locations/migrations/0003_DATA_reset_sequences.py b/ccdb/locations/migrations/0003_DATA_reset_sequences.py new file mode 100644 index 0000000..8fe3cdb --- /dev/null +++ b/ccdb/locations/migrations/0003_DATA_reset_sequences.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.8 on 2017-12-18 13:12 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('locations', '0002_DATA_initial'), + ] + + operations = [ + migrations.RunSQL( + "SELECT setval('locations_region_id_seq', (" + "SELECT MAX(id)+1 FROM locations_region), false)", + + "SELECT setval('locations_region_id_seq', 1, false)" + ), + + migrations.RunSQL( + "SELECT setval('locations_site_id_seq', (" + "SELECT MAX(id)+1 FROM locations_site), false)", + + "SELECT setval('locations_site_id_seq', 1, false)" + ), + + migrations.RunSQL( + "SELECT setval('locations_municipallocation_id_seq', (" + "SELECT MAX(id)+1 FROM locations_municipallocation), false)", + + "SELECT setval('locations_municipallocation_id_seq', 1, false)" + ), + + migrations.RunSQL( + "SELECT setval('locations_studylocation_id_seq', (" + "SELECT MAX(id)+1 FROM locations_studylocation), false)", + + "SELECT setval('locations_studylocation_id_seq', 1, false)" + ), + + migrations.RunSQL( + "SELECT setval('locations_storagelocation_id_seq', (" + "SELECT MAX(id)+1 FROM locations_storagelocation), false)", + + "SELECT setval('locations_storagelocation_id_seq', 1, false)" + ), + + ] diff --git a/ccdb/misc/migrations/0003_DATA_reset_sequences.py b/ccdb/misc/migrations/0003_DATA_reset_sequences.py new file mode 100644 index 0000000..73187e4 --- /dev/null +++ b/ccdb/misc/migrations/0003_DATA_reset_sequences.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.8 on 2017-12-22 14:32 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('misc', '0002_DATA_initial'), + ] + + operations = [ + migrations.RunSQL( + "SELECT setval('misc_measurementunit_id_seq', (" + "SELECT MAX(id)+1 FROM misc_measurementunit), false)", + + "SELECT setval('misc_measurementunit_id_seq', 1, false)" + ), + + migrations.RunSQL( + "SELECT setval('misc_measurementtype_id_seq', (" + "SELECT MAX(id)+1 FROM misc_measurementtype), false)", + + "SELECT setval('misc_measurementtype_id_seq', 1, false)" + ), + + migrations.RunSQL( + "SELECT setval('misc_material_id_seq', (" + "SELECT MAX(id)+1 FROM misc_material), false)", + + "SELECT setval('misc_material_id_seq', 1, false)" + ), + + migrations.RunSQL( + "SELECT setval('misc_color_id_seq', (" + "SELECT MAX(id)+1 FROM misc_color), false)", + + "SELECT setval('misc_color_id_seq', 1, false)" + ), + + migrations.RunSQL( + "SELECT setval('misc_container_id_seq', (" + "SELECT MAX(id)+1 FROM misc_container), false)", + + "SELECT setval('misc_container_id_seq', 1, false)" + ), + ] diff --git a/ccdb/processing/migrations/0003_DATA_reset_sequences.py b/ccdb/processing/migrations/0003_DATA_reset_sequences.py new file mode 100644 index 0000000..ea1f1a2 --- /dev/null +++ b/ccdb/processing/migrations/0003_DATA_reset_sequences.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.8 on 2017-12-22 14:38 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('processing', '0002_DATA_initial'), + ] + + operations = [ + migrations.RunSQL( + "SELECT setval('processing_processtype_id_seq', (" + "SELECT MAX(id)+1 FROM processing_processtype), false)", + + "SELECT setval('processing_processtype_id_seq', 1, false)" + ), + + migrations.RunSQL( + "SELECT setval('processing_reagent_id_seq', (" + "SELECT MAX(id)+1 FROM processing_reagent), false)", + + "SELECT setval('processing_reagent_id_seq', 1, false)" + ), + + migrations.RunSQL( + "SELECT setval('processing_flaw_id_seq', (" + "SELECT MAX(id)+1 FROM processing_flaw), false)", + + "SELECT setval('processing_flaw_id_seq', 1, false)" + ), + + migrations.RunSQL( + "SELECT setval('processing_processing_id_seq', (" + "SELECT MAX(id)+1 FROM processing_processing), false)", + + "SELECT setval('processing_processing_id_seq', 1, false)" + ), + ] diff --git a/ccdb/projects/migrations/0003_DATA_reset_sequences.py b/ccdb/projects/migrations/0003_DATA_reset_sequences.py new file mode 100644 index 0000000..591a7a4 --- /dev/null +++ b/ccdb/projects/migrations/0003_DATA_reset_sequences.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.8 on 2017-12-22 14:41 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('projects', '0002_DATA_initial'), + ] + + operations = [ + migrations.RunSQL( + "SELECT setval('projects_project_id_seq', (" + "SELECT MAX(id)+1 FROM projects_project), false)", + + "SELECT setval('projects_project_id_seq', 1, false)" + ), + + migrations.RunSQL( + "SELECT setval('projects_grant_id_seq', (" + "SELECT MAX(id)+1 FROM projects_grant), false)", + + "SELECT setval('projects_grant_id_seq', 1, false)" + ), + + migrations.RunSQL( + "SELECT setval('projects_grantreport_id_seq', (" + "SELECT MAX(id)+1 FROM projects_grantreport), false)", + + "SELECT setval('projects_grantreport_id_seq', 1, false)" + ), + ] diff --git a/ccdb/species/migrations/0003_DATA_reset_sequences.py b/ccdb/species/migrations/0003_DATA_reset_sequences.py new file mode 100644 index 0000000..e2210e1 --- /dev/null +++ b/ccdb/species/migrations/0003_DATA_reset_sequences.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.8 on 2017-12-22 14:44 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('species', '0002_DATA_initial'), + ] + + operations = [ + migrations.RunSQL( + "SELECT setval('species_species_id_seq', (" + "SELECT MAX(id)+1 FROM species_species), false)", + + "SELECT setval('species_species_id_seq', 1, false)" + ), + + migrations.RunSQL( + "SELECT setval('species_trapspecies_id_seq', (" + "SELECT MAX(id)+1 FROM species_trapspecies), false)", + + "SELECT setval('species_trapspecies_id_seq', 1, false)" + ), + + migrations.RunSQL( + "SELECT setval('species_collectionspecies_id_seq', (" + "SELECT MAX(id)+1 FROM species_collectionspecies), false)", + + "SELECT setval('species_collectionspecies_id_seq', 1, false)" + ), + ]