diff --git a/helm/folio-db/sql/init.sql b/helm/folio-db/sql/init.sql index efa5898..8d6d6cd 100644 --- a/helm/folio-db/sql/init.sql +++ b/helm/folio-db/sql/init.sql @@ -134,15 +134,15 @@ JOIN projects p ON s.project_id = p.id AND p.deleted_at IS NULL LEFT JOIN pathogens pat ON p.pathogen_id = pat.id AND pat.deleted_at IS NULL WHERE s.deleted_at IS NULL; -CREATE OR REPLACE VIEW organisation_projects AS -SELECT - o.id as organisation_id, - o.name as organisation_name, - COUNT(p.id) as project_count -FROM organisations o -LEFT JOIN projects p ON o.id = p.organisation_id AND p.deleted_at IS NULL -WHERE o.deleted_at IS NULL -GROUP BY o.id, o.name; +-- CREATE OR REPLACE VIEW organisation_projects AS +-- SELECT +-- o.id as organisation_id, +-- o.name as organisation_name, +-- COUNT(p.id) as project_count +-- FROM organisations o +-- LEFT JOIN projects p ON o.id = p.organisation_id AND p.deleted_at IS NULL +-- WHERE o.deleted_at IS NULL +-- GROUP BY o.id, o.name; COMMENT ON TABLE pathogens IS 'Reference table for pathogen information'; COMMENT ON TABLE projects IS 'Main projects table containing project metadata';