

--
-- Sequences initialization
--

-- Get the list of all sequences using following command : 
-- SELECT sequence_name from information_schema.sequences where sequence_catalog = 'product-registry-prod' and sequence_name like '%_id_seq' ; 



SELECT setval(' cmn_application_preference_id_seq', max(id) ) from cmn_application_preference ;
SELECT setval(' cmn_event_tracking_id_seq', max(id) ) from cmn_event_tracking ;
SELECT setval(' cmn_path_linking_a_document_id_seq', max(id) ) from cmn_path_linking_a_document ;
SELECT setval(' pr_crawler_reporting_id_seq', max(id) ) from pr_crawler_reporting ;
SELECT setval(' pr_institution_system_id_seq', max(id) ) from pr_institution_system ;
SELECT setval(' pr_integration_statement_download_id_seq', max(id) ) from pr_integration_statement_download  ;
SELECT setval(' pr_search_log_criterion_id_seq', max(id) ) from pr_search_log_criterion ;
SELECT setval(' pr_search_log_report_id_seq', max(id) ) from pr_search_log_report ;
SELECT setval(' pr_subtypes_per_system_id_seq', max(id) ) from pr_subtypes_per_system ;
SELECT setval(' pr_system_actor_profiles_id_seq', max(id) ) from pr_system_actor_profiles ;
SELECT setval(' pr_system_id_seq', max(id) ) from pr_system ;
SELECT setval(' pr_system_in_session_id_seq', max(id) ) from pr_system_in_session ;
SELECT setval(' pr_testing_session_id_seq', max(id) ) from pr_testing_session ;
SELECT setval(' sys_system_subtype_id_seq', max(id) ) from sys_system_subtype ;
SELECT setval(' sys_system_subtypes_per_system_type_id_seq', max(id) ) from sys_system_subtypes_per_system_type ;
SELECT setval(' sys_system_type_id_seq', max(id) ) from sys_system_type ;
SELECT setval(' sys_table_session_id_seq', max(id) ) from sys_table_session ;
SELECT setval(' tf_actor_id_seq', max(id) ) from tf_actor ;
SELECT setval(' tf_actor_integration_profile_id_seq', max(id) ) from tf_actor_integration_profile ;
SELECT setval(' tf_actor_integration_profile_option_id_seq', max(id) ) from tf_actor_integration_profile_option ;
SELECT setval(' tf_domain_id_seq', max(id) ) from tf_domain ;
SELECT setval(' tf_hl7_message_profile_id_seq', max(id) ) from tf_hl7_message_profile ;
SELECT setval(' tf_hl7_message_profile_table_id_seq', max(id) ) from  tf_hl7_message_profile_table ;
SELECT setval(' tf_integration_profile_id_seq', max(id) ) from tf_integration_profile ;
SELECT setval(' tf_integration_profile_option_id_seq', max(id) ) from tf_integration_profile_option ;
SELECT setval(' tf_integration_profile_status_type_id_seq', max(id) ) from tf_integration_profile_status_type ;
SELECT setval(' tf_integration_profile_type_id_seq', max(id) ) from tf_integration_profile_type ;
SELECT setval(' tf_profile_inria_hl7_validation_files_id_seq', max(id) ) from tf_profile_inria_hl7_validation_files  ;
SELECT setval(' tf_profile_link_id_seq', max(id) ) from tf_profile_link ;
SELECT setval(' tf_transaction_id_seq', max(id) ) from tf_transaction ;
SELECT setval(' tf_transaction_link_id_seq', max(id) ) from tf_transaction_link ;
SELECT setval(' tf_transaction_option_type_id_seq', max(id) ) from tf_transaction_option_type ;
SELECT setval(' tf_transaction_status_type_id_seq', max(id) ) from tf_transaction_status_type ;
SELECT setval(' usr_address_id_seq', max(id) ) from usr_address ;
SELECT setval(' usr_gazelle_language_id_seq', max(id) ) from usr_gazelle_language ;
SELECT setval(' usr_institution_id_seq', max(id) ) from usr_institution ;
SELECT setval(' usr_institution_type_id_seq', max(id) ) from usr_institution_type ;
SELECT setval(' usr_person_function_id_seq', max(id) ) from usr_person_function  ;
SELECT setval(' usr_person_id_seq', max(id) ) from usr_person ;
SELECT setval(' usr_role_id_seq', max(id) ) from usr_role ;
SELECT setval(' usr_users_id_seq', max(id) ) from usr_users ;


