 
 
 --
--- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.ar_internal_metadata
-    ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key);
-
-
---
--- Name: baseline_counts baseline_counts_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.baseline_counts
-    ADD CONSTRAINT baseline_counts_pkey PRIMARY KEY (id);
-
-
---
--- Name: baseline_measurements baseline_measurements_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.baseline_measurements
-    ADD CONSTRAINT baseline_measurements_pkey PRIMARY KEY (id);
-
-
---
--- Name: brief_summaries brief_summaries_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.brief_summaries
-    ADD CONSTRAINT brief_summaries_pkey PRIMARY KEY (id);
-
-
---
--- Name: browse_conditions browse_conditions_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.browse_conditions
-    ADD CONSTRAINT browse_conditions_pkey PRIMARY KEY (id);
-
-
---
--- Name: browse_interventions browse_interventions_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.browse_interventions
-    ADD CONSTRAINT browse_interventions_pkey PRIMARY KEY (id);
-
-
---
--- Name: calculated_values calculated_values_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.calculated_values
-    ADD CONSTRAINT calculated_values_pkey PRIMARY KEY (id);
-
-
---
--- Name: central_contacts central_contacts_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.central_contacts
-    ADD CONSTRAINT central_contacts_pkey PRIMARY KEY (id);
-
-
---
--- Name: conditions conditions_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.conditions
-    ADD CONSTRAINT conditions_pkey PRIMARY KEY (id);
-
-
---
--- Name: countries countries_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.countries
-    ADD CONSTRAINT countries_pkey PRIMARY KEY (id);
-
-
---
--- Name: design_group_interventions design_group_interventions_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.design_group_interventions
-    ADD CONSTRAINT design_group_interventions_pkey PRIMARY KEY (id);
-
-
---
--- Name: design_groups design_groups_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.design_groups
-    ADD CONSTRAINT design_groups_pkey PRIMARY KEY (id);
-
-
---
--- Name: design_outcomes design_outcomes_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.design_outcomes
-    ADD CONSTRAINT design_outcomes_pkey PRIMARY KEY (id);
-
-
---
--- Name: designs designs_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.designs
-    ADD CONSTRAINT designs_pkey PRIMARY KEY (id);
-
-
---
--- Name: detailed_descriptions detailed_descriptions_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.detailed_descriptions
-    ADD CONSTRAINT detailed_descriptions_pkey PRIMARY KEY (id);
-
-
---
--- Name: documents documents_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.documents
-    ADD CONSTRAINT documents_pkey PRIMARY KEY (id);
-
-
---
--- Name: drop_withdrawals drop_withdrawals_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.drop_withdrawals
-    ADD CONSTRAINT drop_withdrawals_pkey PRIMARY KEY (id);
-
-
---
--- Name: eligibilities eligibilities_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.eligibilities
-    ADD CONSTRAINT eligibilities_pkey PRIMARY KEY (id);
-
-
---
--- Name: facilities facilities_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.facilities
-    ADD CONSTRAINT facilities_pkey PRIMARY KEY (id);
-
-
---
--- Name: facility_contacts facility_contacts_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.facility_contacts
-    ADD CONSTRAINT facility_contacts_pkey PRIMARY KEY (id);
-
-
---
--- Name: facility_investigators facility_investigators_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.facility_investigators
-    ADD CONSTRAINT facility_investigators_pkey PRIMARY KEY (id);
-
-
---
--- Name: id_information id_information_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.id_information
-    ADD CONSTRAINT id_information_pkey PRIMARY KEY (id);
-
-
---
--- Name: intervention_other_names intervention_other_names_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.intervention_other_names
-    ADD CONSTRAINT intervention_other_names_pkey PRIMARY KEY (id);
-
-
---
--- Name: interventions interventions_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.interventions
-    ADD CONSTRAINT interventions_pkey PRIMARY KEY (id);
-
-
---
--- Name: ipd_information_types ipd_information_types_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.ipd_information_types
-    ADD CONSTRAINT ipd_information_types_pkey PRIMARY KEY (id);
-
-
---
--- Name: keywords keywords_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.keywords
-    ADD CONSTRAINT keywords_pkey PRIMARY KEY (id);
-
-
---
--- Name: links links_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.links
-    ADD CONSTRAINT links_pkey PRIMARY KEY (id);
-
-
---
--- Name: mesh_headings mesh_headings_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.mesh_headings
-    ADD CONSTRAINT mesh_headings_pkey PRIMARY KEY (id);
-
-
---
--- Name: mesh_terms mesh_terms_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.mesh_terms
-    ADD CONSTRAINT mesh_terms_pkey PRIMARY KEY (id);
-
-
---
--- Name: milestones milestones_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.milestones
-    ADD CONSTRAINT milestones_pkey PRIMARY KEY (id);
-
-
---
--- Name: outcome_analyses outcome_analyses_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.outcome_analyses
-    ADD CONSTRAINT outcome_analyses_pkey PRIMARY KEY (id);
-
-
---
--- Name: outcome_analysis_groups outcome_analysis_groups_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.outcome_analysis_groups
-    ADD CONSTRAINT outcome_analysis_groups_pkey PRIMARY KEY (id);
-
-
---
--- Name: outcome_counts outcome_counts_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.outcome_counts
-    ADD CONSTRAINT outcome_counts_pkey PRIMARY KEY (id);
-
-
---
--- Name: outcome_measurements outcome_measurements_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.outcome_measurements
-    ADD CONSTRAINT outcome_measurements_pkey PRIMARY KEY (id);
-
-
---
--- Name: outcomes outcomes_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.outcomes
-    ADD CONSTRAINT outcomes_pkey PRIMARY KEY (id);
-
-
---
--- Name: overall_officials overall_officials_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.overall_officials
-    ADD CONSTRAINT overall_officials_pkey PRIMARY KEY (id);
-
-
---
--- Name: participant_flows participant_flows_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.participant_flows
-    ADD CONSTRAINT participant_flows_pkey PRIMARY KEY (id);
-
-
---
--- Name: pending_results pending_results_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.pending_results
-    ADD CONSTRAINT pending_results_pkey PRIMARY KEY (id);
-
-
---
--- Name: provided_documents provided_documents_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.provided_documents
-    ADD CONSTRAINT provided_documents_pkey PRIMARY KEY (id);
-
-
---
--- Name: reported_event_totals reported_event_totals_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.reported_event_totals
-    ADD CONSTRAINT reported_event_totals_pkey PRIMARY KEY (id);
-
-
---
--- Name: reported_events reported_events_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.reported_events
-    ADD CONSTRAINT reported_events_pkey PRIMARY KEY (id);
-
-
---
--- Name: responsible_parties responsible_parties_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.responsible_parties
-    ADD CONSTRAINT responsible_parties_pkey PRIMARY KEY (id);
-
-
---
--- Name: result_agreements result_agreements_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.result_agreements
-    ADD CONSTRAINT result_agreements_pkey PRIMARY KEY (id);
-
-
---
--- Name: result_contacts result_contacts_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.result_contacts
-    ADD CONSTRAINT result_contacts_pkey PRIMARY KEY (id);
-
-
---
--- Name: result_groups result_groups_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.result_groups
-    ADD CONSTRAINT result_groups_pkey PRIMARY KEY (id);
-
-
---
--- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.schema_migrations
-    ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);
-
-
---
--- Name: search_results search_results_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.search_results
-    ADD CONSTRAINT search_results_pkey PRIMARY KEY (id);
-
-
---
--- Name: sponsors sponsors_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.sponsors
-    ADD CONSTRAINT sponsors_pkey PRIMARY KEY (id);
-
-
---
--- Name: study_references study_references_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.study_references
-    ADD CONSTRAINT study_references_pkey PRIMARY KEY (id);
-
-
---
--- Name: study_searches study_searches_pkey; Type: CONSTRAINT; Schema: ctgov_beta; Owner: -
---
-
-ALTER TABLE ONLY ctgov_beta.study_searches
-    ADD CONSTRAINT study_searches_pkey PRIMARY KEY (id);
-
-
---
 -- Name: load_events load_events_pkey; Type: CONSTRAINT; Schema: support; Owner: -
 --
 



--
-- Name: index_baseline_counts_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_baseline_counts_on_nct_id ON ctgov_beta.baseline_counts USING btree (nct_id);


--
-- Name: index_baseline_measurements_on_category; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_baseline_measurements_on_category ON ctgov_beta.baseline_measurements USING btree (category);


--
-- Name: index_baseline_measurements_on_classification; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_baseline_measurements_on_classification ON ctgov_beta.baseline_measurements USING btree (classification);


--
-- Name: index_baseline_measurements_on_dispersion_type; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_baseline_measurements_on_dispersion_type ON ctgov_beta.baseline_measurements USING btree (dispersion_type);


--
-- Name: index_baseline_measurements_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_baseline_measurements_on_nct_id ON ctgov_beta.baseline_measurements USING btree (nct_id);


--
-- Name: index_baseline_measurements_on_param_type; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_baseline_measurements_on_param_type ON ctgov_beta.baseline_measurements USING btree (param_type);


--
-- Name: index_brief_summaries_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE UNIQUE INDEX index_brief_summaries_on_nct_id ON ctgov_beta.brief_summaries USING btree (nct_id);


--
-- Name: index_browse_conditions_on_downcase_mesh_term; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_browse_conditions_on_downcase_mesh_term ON ctgov_beta.browse_conditions USING btree (downcase_mesh_term);


--
-- Name: index_browse_conditions_on_mesh_term; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_browse_conditions_on_mesh_term ON ctgov_beta.browse_conditions USING btree (mesh_term);


--
-- Name: index_browse_conditions_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_browse_conditions_on_nct_id ON ctgov_beta.browse_conditions USING btree (nct_id);


--
-- Name: index_browse_interventions_on_downcase_mesh_term; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_browse_interventions_on_downcase_mesh_term ON ctgov_beta.browse_interventions USING btree (downcase_mesh_term);


--
-- Name: index_browse_interventions_on_mesh_term; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_browse_interventions_on_mesh_term ON ctgov_beta.browse_interventions USING btree (mesh_term);


--
-- Name: index_browse_interventions_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_browse_interventions_on_nct_id ON ctgov_beta.browse_interventions USING btree (nct_id);


--
-- Name: index_calculated_values_on_actual_duration; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_calculated_values_on_actual_duration ON ctgov_beta.calculated_values USING btree (actual_duration);


--
-- Name: index_calculated_values_on_months_to_report_results; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_calculated_values_on_months_to_report_results ON ctgov_beta.calculated_values USING btree (months_to_report_results);


--
-- Name: index_calculated_values_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE UNIQUE INDEX index_calculated_values_on_nct_id ON ctgov_beta.calculated_values USING btree (nct_id);


--
-- Name: index_calculated_values_on_number_of_facilities; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_calculated_values_on_number_of_facilities ON ctgov_beta.calculated_values USING btree (number_of_facilities);


--
-- Name: index_central_contacts_on_contact_type; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_central_contacts_on_contact_type ON ctgov_beta.central_contacts USING btree (contact_type);


--
-- Name: index_central_contacts_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_central_contacts_on_nct_id ON ctgov_beta.central_contacts USING btree (nct_id);


--
-- Name: index_conditions_on_downcase_name; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_conditions_on_downcase_name ON ctgov_beta.conditions USING btree (downcase_name);


--
-- Name: index_conditions_on_name; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_conditions_on_name ON ctgov_beta.conditions USING btree (name);


--
-- Name: index_conditions_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_conditions_on_nct_id ON ctgov_beta.conditions USING btree (nct_id);


--
-- Name: index_countries_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_countries_on_nct_id ON ctgov_beta.countries USING btree (nct_id);


--
-- Name: index_design_group_interventions_on_design_group_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_design_group_interventions_on_design_group_id ON ctgov_beta.design_group_interventions USING btree (design_group_id);


--
-- Name: index_design_group_interventions_on_intervention_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_design_group_interventions_on_intervention_id ON ctgov_beta.design_group_interventions USING btree (intervention_id);


--
-- Name: index_design_group_interventions_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_design_group_interventions_on_nct_id ON ctgov_beta.design_group_interventions USING btree (nct_id);


--
-- Name: index_design_groups_on_group_type; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_design_groups_on_group_type ON ctgov_beta.design_groups USING btree (group_type);


--
-- Name: index_design_groups_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_design_groups_on_nct_id ON ctgov_beta.design_groups USING btree (nct_id);


--
-- Name: index_design_outcomes_on_measure; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_design_outcomes_on_measure ON ctgov_beta.design_outcomes USING btree (measure);


--
-- Name: index_design_outcomes_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_design_outcomes_on_nct_id ON ctgov_beta.design_outcomes USING btree (nct_id);


--
-- Name: index_design_outcomes_on_outcome_type; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_design_outcomes_on_outcome_type ON ctgov_beta.design_outcomes USING btree (outcome_type);


--
-- Name: index_designs_on_caregiver_masked; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_designs_on_caregiver_masked ON ctgov_beta.designs USING btree (caregiver_masked);


--
-- Name: index_designs_on_investigator_masked; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_designs_on_investigator_masked ON ctgov_beta.designs USING btree (investigator_masked);


--
-- Name: index_designs_on_masking; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_designs_on_masking ON ctgov_beta.designs USING btree (masking);


--
-- Name: index_designs_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE UNIQUE INDEX index_designs_on_nct_id ON ctgov_beta.designs USING btree (nct_id);


--
-- Name: index_designs_on_outcomes_assessor_masked; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_designs_on_outcomes_assessor_masked ON ctgov_beta.designs USING btree (outcomes_assessor_masked);


--
-- Name: index_designs_on_subject_masked; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_designs_on_subject_masked ON ctgov_beta.designs USING btree (subject_masked);


--
-- Name: index_detailed_descriptions_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE UNIQUE INDEX index_detailed_descriptions_on_nct_id ON ctgov_beta.detailed_descriptions USING btree (nct_id);


--
-- Name: index_documents_on_document_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_documents_on_document_id ON ctgov_beta.documents USING btree (document_id);


--
-- Name: index_documents_on_document_type; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_documents_on_document_type ON ctgov_beta.documents USING btree (document_type);


--
-- Name: index_documents_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_documents_on_nct_id ON ctgov_beta.documents USING btree (nct_id);


--
-- Name: index_drop_withdrawals_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_drop_withdrawals_on_nct_id ON ctgov_beta.drop_withdrawals USING btree (nct_id);


--
-- Name: index_drop_withdrawals_on_period; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_drop_withdrawals_on_period ON ctgov_beta.drop_withdrawals USING btree (period);


--
-- Name: index_eligibilities_on_gender; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_eligibilities_on_gender ON ctgov_beta.eligibilities USING btree (gender);


--
-- Name: index_eligibilities_on_healthy_volunteers; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_eligibilities_on_healthy_volunteers ON ctgov_beta.eligibilities USING btree (healthy_volunteers);


--
-- Name: index_eligibilities_on_maximum_age; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_eligibilities_on_maximum_age ON ctgov_beta.eligibilities USING btree (maximum_age);


--
-- Name: index_eligibilities_on_minimum_age; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_eligibilities_on_minimum_age ON ctgov_beta.eligibilities USING btree (minimum_age);


--
-- Name: index_eligibilities_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE UNIQUE INDEX index_eligibilities_on_nct_id ON ctgov_beta.eligibilities USING btree (nct_id);


--
-- Name: index_facilities_on_city; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_facilities_on_city ON ctgov_beta.facilities USING btree (city);


--
-- Name: index_facilities_on_country; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_facilities_on_country ON ctgov_beta.facilities USING btree (country);


--
-- Name: index_facilities_on_name; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_facilities_on_name ON ctgov_beta.facilities USING btree (name);


--
-- Name: index_facilities_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_facilities_on_nct_id ON ctgov_beta.facilities USING btree (nct_id);


--
-- Name: index_facilities_on_state; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_facilities_on_state ON ctgov_beta.facilities USING btree (state);


--
-- Name: index_facilities_on_status; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_facilities_on_status ON ctgov_beta.facilities USING btree (status);


--
-- Name: index_facility_contacts_on_contact_type; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_facility_contacts_on_contact_type ON ctgov_beta.facility_contacts USING btree (contact_type);


--
-- Name: index_facility_contacts_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_facility_contacts_on_nct_id ON ctgov_beta.facility_contacts USING btree (nct_id);


--
-- Name: index_facility_investigators_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_facility_investigators_on_nct_id ON ctgov_beta.facility_investigators USING btree (nct_id);


--
-- Name: index_id_information_on_id_type; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_id_information_on_id_type ON ctgov_beta.id_information USING btree (id_type);


--
-- Name: index_id_information_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_id_information_on_nct_id ON ctgov_beta.id_information USING btree (nct_id);


--
-- Name: index_intervention_other_names_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_intervention_other_names_on_nct_id ON ctgov_beta.intervention_other_names USING btree (nct_id);


--
-- Name: index_interventions_on_intervention_type; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_interventions_on_intervention_type ON ctgov_beta.interventions USING btree (intervention_type);


--
-- Name: index_interventions_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_interventions_on_nct_id ON ctgov_beta.interventions USING btree (nct_id);


--
-- Name: index_ipd_information_types_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_ipd_information_types_on_nct_id ON ctgov_beta.ipd_information_types USING btree (nct_id);


--
-- Name: index_keywords_on_downcase_name; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_keywords_on_downcase_name ON ctgov_beta.keywords USING btree (downcase_name);


--
-- Name: index_keywords_on_name; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_keywords_on_name ON ctgov_beta.keywords USING btree (name);


--
-- Name: index_keywords_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_keywords_on_nct_id ON ctgov_beta.keywords USING btree (nct_id);


--
-- Name: index_links_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_links_on_nct_id ON ctgov_beta.links USING btree (nct_id);


--
-- Name: index_mesh_headings_on_qualifier; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_mesh_headings_on_qualifier ON ctgov_beta.mesh_headings USING btree (qualifier);


--
-- Name: index_mesh_terms_on_description; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_mesh_terms_on_description ON ctgov_beta.mesh_terms USING btree (description);


--
-- Name: index_mesh_terms_on_downcase_mesh_term; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_mesh_terms_on_downcase_mesh_term ON ctgov_beta.mesh_terms USING btree (downcase_mesh_term);


--
-- Name: index_mesh_terms_on_mesh_term; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_mesh_terms_on_mesh_term ON ctgov_beta.mesh_terms USING btree (mesh_term);


--
-- Name: index_mesh_terms_on_qualifier; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_mesh_terms_on_qualifier ON ctgov_beta.mesh_terms USING btree (qualifier);


--
-- Name: index_milestones_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_milestones_on_nct_id ON ctgov_beta.milestones USING btree (nct_id);


--
-- Name: index_milestones_on_period; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_milestones_on_period ON ctgov_beta.milestones USING btree (period);


--
-- Name: index_outcome_analyses_on_dispersion_type; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_outcome_analyses_on_dispersion_type ON ctgov_beta.outcome_analyses USING btree (dispersion_type);


--
-- Name: index_outcome_analyses_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_outcome_analyses_on_nct_id ON ctgov_beta.outcome_analyses USING btree (nct_id);


--
-- Name: index_outcome_analyses_on_param_type; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_outcome_analyses_on_param_type ON ctgov_beta.outcome_analyses USING btree (param_type);


--
-- Name: index_outcome_analysis_groups_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_outcome_analysis_groups_on_nct_id ON ctgov_beta.outcome_analysis_groups USING btree (nct_id);


--
-- Name: index_outcome_counts_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_outcome_counts_on_nct_id ON ctgov_beta.outcome_counts USING btree (nct_id);


--
-- Name: index_outcome_measurements_on_category; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_outcome_measurements_on_category ON ctgov_beta.outcome_measurements USING btree (category);


--
-- Name: index_outcome_measurements_on_classification; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_outcome_measurements_on_classification ON ctgov_beta.outcome_measurements USING btree (classification);


--
-- Name: index_outcome_measurements_on_dispersion_type; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_outcome_measurements_on_dispersion_type ON ctgov_beta.outcome_measurements USING btree (dispersion_type);


--
-- Name: index_outcome_measurements_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_outcome_measurements_on_nct_id ON ctgov_beta.outcome_measurements USING btree (nct_id);


--
-- Name: index_outcomes_on_dispersion_type; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_outcomes_on_dispersion_type ON ctgov_beta.outcomes USING btree (dispersion_type);


--
-- Name: index_outcomes_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_outcomes_on_nct_id ON ctgov_beta.outcomes USING btree (nct_id);


--
-- Name: index_outcomes_on_param_type; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_outcomes_on_param_type ON ctgov_beta.outcomes USING btree (param_type);


--
-- Name: index_overall_officials_on_affiliation; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_overall_officials_on_affiliation ON ctgov_beta.overall_officials USING btree (affiliation);


--
-- Name: index_overall_officials_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_overall_officials_on_nct_id ON ctgov_beta.overall_officials USING btree (nct_id);


--
-- Name: index_participant_flows_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE UNIQUE INDEX index_participant_flows_on_nct_id ON ctgov_beta.participant_flows USING btree (nct_id);


--
-- Name: index_pending_results_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_pending_results_on_nct_id ON ctgov_beta.pending_results USING btree (nct_id);


--
-- Name: index_provided_documents_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_provided_documents_on_nct_id ON ctgov_beta.provided_documents USING btree (nct_id);


--
-- Name: index_reported_event_totals_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_reported_event_totals_on_nct_id ON ctgov_beta.reported_event_totals USING btree (nct_id);


--
-- Name: index_reported_events_on_event_type; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_reported_events_on_event_type ON ctgov_beta.reported_events USING btree (event_type);


--
-- Name: index_reported_events_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_reported_events_on_nct_id ON ctgov_beta.reported_events USING btree (nct_id);


--
-- Name: index_reported_events_on_subjects_affected; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_reported_events_on_subjects_affected ON ctgov_beta.reported_events USING btree (subjects_affected);


--
-- Name: index_responsible_parties_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_responsible_parties_on_nct_id ON ctgov_beta.responsible_parties USING btree (nct_id);


--
-- Name: index_responsible_parties_on_organization; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_responsible_parties_on_organization ON ctgov_beta.responsible_parties USING btree (organization);


--
-- Name: index_responsible_parties_on_responsible_party_type; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_responsible_parties_on_responsible_party_type ON ctgov_beta.responsible_parties USING btree (responsible_party_type);


--
-- Name: index_result_agreements_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_result_agreements_on_nct_id ON ctgov_beta.result_agreements USING btree (nct_id);


--
-- Name: index_result_contacts_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_result_contacts_on_nct_id ON ctgov_beta.result_contacts USING btree (nct_id);


--
-- Name: index_result_contacts_on_organization; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_result_contacts_on_organization ON ctgov_beta.result_contacts USING btree (organization);


--
-- Name: index_result_groups_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_result_groups_on_nct_id ON ctgov_beta.result_groups USING btree (nct_id);


--
-- Name: index_result_groups_on_result_type; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_result_groups_on_result_type ON ctgov_beta.result_groups USING btree (result_type);


--
-- Name: index_search_results_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_search_results_on_nct_id ON ctgov_beta.search_results USING btree (nct_id);


--
-- Name: index_search_results_on_nct_id_and_name; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE UNIQUE INDEX index_search_results_on_nct_id_and_name ON ctgov_beta.search_results USING btree (nct_id, name);


--
-- Name: index_search_results_on_nct_id_and_name_and_grouping; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE UNIQUE INDEX index_search_results_on_nct_id_and_name_and_grouping ON ctgov_beta.search_results USING btree (nct_id, name, "grouping");


--
-- Name: index_sponsors_on_agency_class; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_sponsors_on_agency_class ON ctgov_beta.sponsors USING btree (agency_class);


--
-- Name: index_sponsors_on_name; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_sponsors_on_name ON ctgov_beta.sponsors USING btree (name);


--
-- Name: index_sponsors_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_sponsors_on_nct_id ON ctgov_beta.sponsors USING btree (nct_id);


--
-- Name: index_studies_on_completion_date; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_studies_on_completion_date ON ctgov_beta.studies USING btree (completion_date);


--
-- Name: index_studies_on_disposition_first_submitted_date; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_studies_on_disposition_first_submitted_date ON ctgov_beta.studies USING btree (disposition_first_submitted_date);


--
-- Name: index_studies_on_enrollment_type; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_studies_on_enrollment_type ON ctgov_beta.studies USING btree (enrollment_type);


--
-- Name: index_studies_on_last_known_status; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_studies_on_last_known_status ON ctgov_beta.studies USING btree (last_known_status);


--
-- Name: index_studies_on_last_update_submitted_date; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_studies_on_last_update_submitted_date ON ctgov_beta.studies USING btree (last_update_submitted_date);


--
-- Name: index_studies_on_last_update_submitted_qc_date; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_studies_on_last_update_submitted_qc_date ON ctgov_beta.studies USING btree (last_update_submitted_qc_date);


--
-- Name: index_studies_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE UNIQUE INDEX index_studies_on_nct_id ON ctgov_beta.studies USING btree (nct_id);


--
-- Name: index_studies_on_overall_status; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_studies_on_overall_status ON ctgov_beta.studies USING btree (overall_status);


--
-- Name: index_studies_on_phase; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_studies_on_phase ON ctgov_beta.studies USING btree (phase);


--
-- Name: index_studies_on_primary_completion_date; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_studies_on_primary_completion_date ON ctgov_beta.studies USING btree (primary_completion_date);


--
-- Name: index_studies_on_primary_completion_date_type; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_studies_on_primary_completion_date_type ON ctgov_beta.studies USING btree (primary_completion_date_type);


--
-- Name: index_studies_on_results_first_submitted_date; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_studies_on_results_first_submitted_date ON ctgov_beta.studies USING btree (results_first_submitted_date);


--
-- Name: index_studies_on_results_first_submitted_qc_date; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_studies_on_results_first_submitted_qc_date ON ctgov_beta.studies USING btree (results_first_submitted_qc_date);


--
-- Name: index_studies_on_source; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_studies_on_source ON ctgov_beta.studies USING btree (source);


--
-- Name: index_studies_on_start_date; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_studies_on_start_date ON ctgov_beta.studies USING btree (start_date);


--
-- Name: index_studies_on_start_date_type; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_studies_on_start_date_type ON ctgov_beta.studies USING btree (start_date_type);


--
-- Name: index_studies_on_study_first_submitted_date; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_studies_on_study_first_submitted_date ON ctgov_beta.studies USING btree (study_first_submitted_date);


--
-- Name: index_studies_on_study_first_submitted_qc_date; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_studies_on_study_first_submitted_qc_date ON ctgov_beta.studies USING btree (study_first_submitted_qc_date);


--
-- Name: index_studies_on_study_type; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_studies_on_study_type ON ctgov_beta.studies USING btree (study_type);


--
-- Name: index_study_references_on_nct_id; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_study_references_on_nct_id ON ctgov_beta.study_references USING btree (nct_id);


--
-- Name: index_study_references_on_pmid; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_study_references_on_pmid ON ctgov_beta.study_references USING btree (pmid);


--
-- Name: index_study_references_on_reference_type; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE INDEX index_study_references_on_reference_type ON ctgov_beta.study_references USING btree (reference_type);


--
-- Name: index_study_searches_on_query_and_grouping; Type: INDEX; Schema: ctgov_beta; Owner: -
--

CREATE UNIQUE INDEX index_study_searches_on_query_and_grouping ON ctgov_beta.study_searches USING btree (query, "grouping");


--
-- Name: index_support.load_events_on_event_type; Type: INDEX; Schema: support; Owner: -
--


        $_$;


SET default_tablespace = '';

SET default_table_access_method = heap;
