clns-acuity-docker/images/postgres/data/update_sequences.sql (22 lines of code) (raw):
SELECT setval('groups_sequence', (SELECT cast(max(id) as bigint) FROM acuity.groups), true);
SELECT setval('group_members_sequence', (SELECT cast(max(id) as bigint) FROM acuity.group_members), true);
SELECT setval('mpr_seq', (SELECT cast(max(mpr_id) as bigint) FROM acuity.map_project_rule), true);
SELECT setval('msr_seq', (SELECT cast(max(msr_id) as bigint) FROM acuity.map_study_rule), true);
SELECT setval('map_seq', (SELECT cast(max(msbd_id) as bigint) FROM acuity.map_study_baseline_drug), true);
SELECT setval('msag_seq', (SELECT cast(max(msag_id) as bigint) FROM acuity.map_study_ae_group), true);
SELECT setval('mslg_seq', (SELECT cast(max(mslg_id) as bigint) FROM acuity.map_study_lab_group), true);
SELECT setval('mlgr_seq', (SELECT cast(max(mlgr_id) as bigint) FROM acuity.map_lab_group_rule), true);
SELECT setval('magr_seq', (SELECT cast(max(magr_id) as bigint) FROM acuity.map_ae_group_rule), true);
SELECT setval('mlgv_seq', (SELECT cast(max(mlgv_id) as bigint) FROM acuity.map_lab_group_value_rule), true);
SELECT setval('magv_seq', (SELECT cast(max(magv_id) as bigint) FROM acuity.map_ae_group_value_rule), true);
SELECT setval('cll_seq', (SELECT cast(max(cll_id) as bigint) FROM acuity.map_custom_labcode_lookup), true);
SELECT setval('mfr_seq', (SELECT cast(max(mfr_id) as bigint) FROM acuity.map_file_rule), true);
SELECT setval('mmr_seq', (SELECT cast(max(mmr_id) as bigint) FROM acuity.map_mapping_rule), true);
SELECT setval('mrf_seq', (SELECT cast(max(mrf_id) as bigint) FROM acuity.map_mapping_rule_field), true);
SELECT setval('mcr_seq', (SELECT cast(max(mcr_id) as bigint) FROM acuity.map_column_rule), true);
SELECT setval('mdf_seq', (SELECT cast(max(mdf_id) as bigint) FROM acuity.map_description_file), true);
SELECT setval('map_dynamic_field_seq', (SELECT cast(max(mdfi_id) as bigint) FROM acuity.map_dynamic_field), true);
SELECT setval('acl_sid_sequence', (SELECT cast(max(id) as bigint) FROM acuity.acl_sid), true);
SELECT setval('acl_object_identity_sequence', (SELECT cast(max(id) as bigint) FROM acuity.acl_object_identity), true);
SELECT setval('acl_entry_sequence', (SELECT cast(max(id) as bigint) FROM acuity.acl_entry), true);
SELECT setval('acl_object_sequence', (SELECT cast(max(id) as bigint) FROM acuity.acl_object), true);