Skip to content
14 changes: 14 additions & 0 deletions apps/backend/db/db_setup.sql
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ CREATE TABLE expenditures (
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE reports (
report_id SERIAL PRIMARY KEY,
project_id INT NOT NULL REFERENCES projects(project_id) ON DELETE CASCADE,
object_url TEXT NOT NULL,
date_created DATE NOT NULL DEFAULT CURRENT_DATE
);

INSERT INTO users (name, email, is_admin) VALUES
('Ashley Duggan', 'ashley@branch.org', TRUE),
('Renee Reddy', 'renee@branch.org', TRUE),
Expand Down Expand Up @@ -88,3 +95,10 @@ INSERT INTO expenditures (project_id, entered_by, amount, category, description,
(1, 1, 5000, 'Travel', 'Conference attendance', '2025-02-10'),
(2, 2, 3000, 'Equipment', 'Purchase of recording devices', '2025-04-05'),
(3, 3, 2500, 'Supplies', 'Educational materials', '2025-07-12');

INSERT INTO reports (project_id, object_url) VALUES
(1, 'https://s3.amazonaws.com/branch-reports/clinician_communication_study_report.pdf'),
(2, 'https://s3.amazonaws.com/branch-reports/health_education_initiative_report.pdf'),
(3, 'https://s3.amazonaws.com/branch-reports/policy_advocacy_program_report.pdf'),
(2, 'https://s3.amazonaws.com/branch-reports/research_program_reports.pdf'),
(3, 'https://s3.amazonaws.com/branch-reports/health_care_data_reports.pdf');