-- Create ohs_issues table
CREATE TABLE ohs_issues (
    id SERIAL PRIMARY KEY,
    description TEXT,
    type VARCHAR(100),
    category VARCHAR(100),
    impact VARCHAR(255),
    risk_or_opportunity VARCHAR(255),
    action_taken TEXT,
    owner VARCHAR(100),
    review_date DATE,
    tenant_id INTEGER DEFAULT NULL,
    branch_id INTEGER DEFAULT NULL,
    isDeleted BOOLEAN NOT NULL DEFAULT FALSE,
    updatedAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE INDEX ohs_issues_tenant_idx ON ohs_issues(tenant_id);
CREATE INDEX ohs_issues_branch_idx ON ohs_issues(branch_id);
