 GRANT USAGE ON SCHEMA darwin2 TO cebmpad;
 ALTER DEFAULT PRIVILEGES IN SCHEMA darwin2 GRANT ALL on TABLES to darwin2;
 ALTER DEFAULT PRIVILEGES IN SCHEMA darwin2 GRANT ALL on SEQUENCES to darwin2;
 ALTER DEFAULT PRIVILEGES IN SCHEMA darwin2 GRANT ALL on FUNCTIONS to darwin2;

 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.template_table_record_ref TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.catalogue_levels TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.template_classifications TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.collection_maintenance TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.catalogue_relationships TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.classification_keywords TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.collections TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.collections_rights TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.comments TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.collecting_tools TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.collecting_methods TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.codes TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.classification_synonymies TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.igs TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.ext_links TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.expeditions TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.identifications TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.flat_dict TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.insurances TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.lithology TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.imports TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.migrated_parts TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.people_addresses TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.template_people TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.people_comm TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.my_saved_searches TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.my_widgets TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.template_people_users_comm_common TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.specimen_collecting_methods TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.people_languages TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.specimens_relationships TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.possible_upper_levels TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.people_relationships TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.preferences TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.staging_tag_groups TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.users_comm TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.tags TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.users_login_infos TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.users_addresses TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.staging_people TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.users_tracking TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.taxonomy TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.words TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.lithostratigraphy TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.staging TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.mineralogy TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.tag_groups TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.chronostratigraphy TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.catalogue_people TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.gtu TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.vernacular_names TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.specimen_collecting_tools TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.old_multimedia TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.specimens TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.people TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.multimedia TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.loan_items TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.loan_rights TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.loan_status TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.informative_workflow TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.users TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.loans TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.loan_history TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.catalogue_bibliography TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.bibliography TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.specimens_relationships TO cebmpad;
 GRANT SELECT, INSERT, UPDATE, DELETE ON darwin2.properties TO cebmpad;

 GRANT USAGE, SELECT ON SEQUENCE darwin2.staging_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.catalogue_levels_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.catalogue_people_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.catalogue_relationships_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.chronostratigraphy_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.classification_synonymies_group_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.codes_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.classification_keywords_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.classification_synonymies_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.collecting_methods_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.collecting_tools_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.collection_maintenance_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.collections_rights_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.collections_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.comments_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.expeditions_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.ext_links_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.flat_dict_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.gtu_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.identifications_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.igs_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.imports_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.insurances_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.lithology_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.lithostratigraphy_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.my_widgets_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.mineralogy_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.multimedia_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.my_saved_searches_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.people_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.people_addresses_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.people_comm_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.people_languages_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.preferences_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.people_relationships_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.specimen_collecting_methods_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.specimen_collecting_tools_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.specimens_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.specimens_accompanying_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.staging_people_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.users_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.staging_tag_groups_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.users_addresses_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.tag_groups_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.taxonomy_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.users_comm_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.users_tracking_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.informative_workflow_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.vernacular_names_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.users_login_info_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.loans_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.loan_items_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.loan_rights_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.loan_status_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.loan_history_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.bibliography_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.catalogue_bibliography_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.specimens_relationships_id_seq TO cebmpad;
 GRANT USAGE, SELECT ON SEQUENCE darwin2.properties_id_seq TO cebmpad;



