--
-- Copyright 2009 Glencoe Software, Inc. All rights reserved.
-- Use is subject to license terms supplied in LICENSE.txt
--

BEGIN;
-- Correcting sequences pre-new generator switch (#1176)
SELECT setval('seq_acquisitionmode', id) FROM acquisitionmode ORDER BY id DESC LIMIT 1;
SELECT setval('seq_annotation', id) FROM annotation ORDER BY id DESC LIMIT 1;
SELECT setval('seq_annotationannotationlink', id) FROM annotationannotationlink ORDER BY id DESC LIMIT 1;
SELECT setval('seq_arctype', id) FROM arctype ORDER BY id DESC LIMIT 1;
SELECT setval('seq_binning', id) FROM binning ORDER BY id DESC LIMIT 1;
SELECT setval('seq_channel', id) FROM channel ORDER BY id DESC LIMIT 1;
SELECT setval('seq_channelannotationlink', id) FROM channelannotationlink ORDER BY id DESC LIMIT 1;
SELECT setval('seq_channelbinding', id) FROM channelbinding ORDER BY id DESC LIMIT 1;
SELECT setval('seq_codomainmapcontext', id) FROM codomainmapcontext ORDER BY id DESC LIMIT 1;
SELECT setval('seq_contrastmethod', id) FROM contrastmethod ORDER BY id DESC LIMIT 1;
SELECT setval('seq_correction', id) FROM correction ORDER BY id DESC LIMIT 1;
SELECT setval('seq_dataset', id) FROM dataset ORDER BY id DESC LIMIT 1;
SELECT setval('seq_datasetannotationlink', id) FROM datasetannotationlink ORDER BY id DESC LIMIT 1;
SELECT setval('seq_datasetimagelink', id) FROM datasetimagelink ORDER BY id DESC LIMIT 1;
SELECT setval('seq_dbpatch', id) FROM dbpatch ORDER BY id DESC LIMIT 1;
SELECT setval('seq_detector', id) FROM detector ORDER BY id DESC LIMIT 1;
SELECT setval('seq_detectorsettings', id) FROM detectorsettings ORDER BY id DESC LIMIT 1;
SELECT setval('seq_detectortype', id) FROM detectortype ORDER BY id DESC LIMIT 1;
SELECT setval('seq_dichroic', id) FROM dichroic ORDER BY id DESC LIMIT 1;
SELECT setval('seq_dimensionorder', id) FROM dimensionorder ORDER BY id DESC LIMIT 1;
SELECT setval('seq_event', id) FROM event ORDER BY id DESC LIMIT 1;
SELECT setval('seq_eventlog', id) FROM eventlog ORDER BY id DESC LIMIT 1;
SELECT setval('seq_eventtype', id) FROM eventtype ORDER BY id DESC LIMIT 1;
SELECT setval('seq_experiment', id) FROM experiment ORDER BY id DESC LIMIT 1;
SELECT setval('seq_experimenter', id) FROM experimenter ORDER BY id DESC LIMIT 1;
SELECT setval('seq_experimenterannotationlink', id) FROM experimenterannotationlink ORDER BY id DESC LIMIT 1;
SELECT setval('seq_experimentergroup', id) FROM experimentergroup ORDER BY id DESC LIMIT 1;
SELECT setval('seq_experimentergroupannotationlink', id) FROM experimentergroupannotationlink ORDER BY id DESC LIMIT 1;
SELECT setval('seq_experimenttype', id) FROM experimenttype ORDER BY id DESC LIMIT 1;
SELECT setval('seq_externalinfo', id) FROM externalinfo ORDER BY id DESC LIMIT 1;
SELECT setval('seq_family', id) FROM family ORDER BY id DESC LIMIT 1;
SELECT setval('seq_filamenttype', id) FROM filamenttype ORDER BY id DESC LIMIT 1;
SELECT setval('seq_filter', id) FROM filter ORDER BY id DESC LIMIT 1;
SELECT setval('seq_filterset', id) FROM filterset ORDER BY id DESC LIMIT 1;
SELECT setval('seq_filtertype', id) FROM filtertype ORDER BY id DESC LIMIT 1;
SELECT setval('seq_format', id) FROM format ORDER BY id DESC LIMIT 1;
SELECT setval('seq_groupexperimentermap', id) FROM groupexperimentermap ORDER BY id DESC LIMIT 1;
SELECT setval('seq_illumination', id) FROM illumination ORDER BY id DESC LIMIT 1;
SELECT setval('seq_image', id) FROM image ORDER BY id DESC LIMIT 1;
SELECT setval('seq_imageannotationlink', id) FROM imageannotationlink ORDER BY id DESC LIMIT 1;
SELECT setval('seq_imagingenvironment', id) FROM imagingenvironment ORDER BY id DESC LIMIT 1;
SELECT setval('seq_immersion', id) FROM immersion ORDER BY id DESC LIMIT 1;
SELECT setval('seq_instrument', id) FROM instrument ORDER BY id DESC LIMIT 1;
SELECT setval('seq_job', id) FROM job ORDER BY id DESC LIMIT 1;
SELECT setval('seq_joboriginalfilelink', id) FROM joboriginalfilelink ORDER BY id DESC LIMIT 1;
SELECT setval('seq_jobstatus', id) FROM jobstatus ORDER BY id DESC LIMIT 1;
SELECT setval('seq_lasermedium', id) FROM lasermedium ORDER BY id DESC LIMIT 1;
SELECT setval('seq_lasertype', id) FROM lasertype ORDER BY id DESC LIMIT 1;
SELECT setval('seq_lightsettings', id) FROM lightsettings ORDER BY id DESC LIMIT 1;
SELECT setval('seq_lightsource', id) FROM lightsource ORDER BY id DESC LIMIT 1;
SELECT setval('seq_link', id) FROM link ORDER BY id DESC LIMIT 1;
SELECT setval('seq_logicalchannel', id) FROM logicalchannel ORDER BY id DESC LIMIT 1;
SELECT setval('seq_medium', id) FROM medium ORDER BY id DESC LIMIT 1;
SELECT setval('seq_microbeammanipulation', id) FROM microbeammanipulation ORDER BY id DESC LIMIT 1;
SELECT setval('seq_microbeammanipulationtype', id) FROM microbeammanipulationtype ORDER BY id DESC LIMIT 1;
SELECT setval('seq_microscope', id) FROM microscope ORDER BY id DESC LIMIT 1;
SELECT setval('seq_microscopetype', id) FROM microscopetype ORDER BY id DESC LIMIT 1;
SELECT setval('seq_node', id) FROM node ORDER BY id DESC LIMIT 1;
SELECT setval('seq_nodeannotationlink', id) FROM nodeannotationlink ORDER BY id DESC LIMIT 1;
SELECT setval('seq_objective', id) FROM objective ORDER BY id DESC LIMIT 1;
SELECT setval('seq_objectivesettings', id) FROM objectivesettings ORDER BY id DESC LIMIT 1;
SELECT setval('seq_originalfile', id) FROM originalfile ORDER BY id DESC LIMIT 1;
SELECT setval('seq_originalfileannotationlink', id) FROM originalfileannotationlink ORDER BY id DESC LIMIT 1;
SELECT setval('seq_otf', id) FROM otf ORDER BY id DESC LIMIT 1;
SELECT setval('seq_photometricinterpretation', id) FROM photometricinterpretation ORDER BY id DESC LIMIT 1;
SELECT setval('seq_pixels', id) FROM pixels ORDER BY id DESC LIMIT 1;
SELECT setval('seq_pixelsannotationlink', id) FROM pixelsannotationlink ORDER BY id DESC LIMIT 1;
SELECT setval('seq_pixelsoriginalfilemap', id) FROM pixelsoriginalfilemap ORDER BY id DESC LIMIT 1;
SELECT setval('seq_pixelstype', id) FROM pixelstype ORDER BY id DESC LIMIT 1;
SELECT setval('seq_planeinfo', id) FROM planeinfo ORDER BY id DESC LIMIT 1;
SELECT setval('seq_planeinfoannotationlink', id) FROM planeinfoannotationlink ORDER BY id DESC LIMIT 1;
SELECT setval('seq_plate', id) FROM plate ORDER BY id DESC LIMIT 1;
SELECT setval('seq_plateannotationlink', id) FROM plateannotationlink ORDER BY id DESC LIMIT 1;
SELECT setval('seq_project', id) FROM project ORDER BY id DESC LIMIT 1;
SELECT setval('seq_projectannotationlink', id) FROM projectannotationlink ORDER BY id DESC LIMIT 1;
SELECT setval('seq_projectdatasetlink', id) FROM projectdatasetlink ORDER BY id DESC LIMIT 1;
SELECT setval('seq_pulse', id) FROM pulse ORDER BY id DESC LIMIT 1;
SELECT setval('seq_quantumdef', id) FROM quantumdef ORDER BY id DESC LIMIT 1;
SELECT setval('seq_reagent', id) FROM reagent ORDER BY id DESC LIMIT 1;
SELECT setval('seq_reagentannotationlink', id) FROM reagentannotationlink ORDER BY id DESC LIMIT 1;
SELECT setval('seq_renderingdef', id) FROM renderingdef ORDER BY id DESC LIMIT 1;
SELECT setval('seq_renderingmodel', id) FROM renderingmodel ORDER BY id DESC LIMIT 1;
SELECT setval('seq_screen', id) FROM screen ORDER BY id DESC LIMIT 1;
SELECT setval('seq_screenacquisition', id) FROM screenacquisition ORDER BY id DESC LIMIT 1;
SELECT setval('seq_screenacquisitionannotationlink', id) FROM screenacquisitionannotationlink ORDER BY id DESC LIMIT 1;
SELECT setval('seq_screenacquisitionwellsamplelink', id) FROM screenacquisitionwellsamplelink ORDER BY id DESC LIMIT 1;
SELECT setval('seq_screenannotationlink', id) FROM screenannotationlink ORDER BY id DESC LIMIT 1;
SELECT setval('seq_screenplatelink', id) FROM screenplatelink ORDER BY id DESC LIMIT 1;
SELECT setval('seq_session', id) FROM session ORDER BY id DESC LIMIT 1;
SELECT setval('seq_sessionannotationlink', id) FROM sessionannotationlink ORDER BY id DESC LIMIT 1;
SELECT setval('seq_stagelabel', id) FROM stagelabel ORDER BY id DESC LIMIT 1;
SELECT setval('seq_statsinfo', id) FROM statsinfo ORDER BY id DESC LIMIT 1;
SELECT setval('seq_thumbnail', id) FROM thumbnail ORDER BY id DESC LIMIT 1;
SELECT setval('seq_transmittancerange', id) FROM transmittancerange ORDER BY id DESC LIMIT 1;
SELECT setval('seq_well', id) FROM well ORDER BY id DESC LIMIT 1;
SELECT setval('seq_wellannotationlink', id) FROM wellannotationlink ORDER BY id DESC LIMIT 1;
SELECT setval('seq_wellreagentlink', id) FROM wellreagentlink ORDER BY id DESC LIMIT 1;
SELECT setval('seq_wellsample', id) FROM wellsample ORDER BY id DESC LIMIT 1;
SELECT setval('seq_wellsampleannotationlink', id) FROM wellsampleannotationlink ORDER BY id DESC LIMIT 1;
COMMIT;
