BUG: reset db id sequences (#43)

Fixes #42
This commit is contained in:
Matthew Ryan Dillon 2017-12-22 08:12:23 -07:00 committed by GitHub
parent 3b7e07bc28
commit 8d356716b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 281 additions and 0 deletions

View file

@ -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)"
),
]

View file

@ -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)"
),
]

View file

@ -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)"
),
]

View file

@ -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)"
),
]

View file

@ -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)"
),
]

View file

@ -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)"
),
]