-- Create fishbone_diagrams table

CREATE TABLE fishbone_diagrams (
    id SERIAL,
    tenant_id INTEGER DEFAULT NULL,
    branch_id INTEGER DEFAULT NULL,
    problem VARCHAR(255) NOT NULL,
    diagram_data json DEFAULT NULL,
    isDeleted BOOLEAN NOT NULL DEFAULT FALSE,
    updatedAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    PRIMARY KEY (id)
);
CREATE INDEX fishbone_diagrams_tenant_idx ON fishbone_diagrams (tenant_id);
CREATE INDEX fishbone_diagrams_branch_idx ON fishbone_diagrams (branch_id);
