CREATE TABLE corrective_actions (
    id SERIAL PRIMARY KEY,
    incident_id INTEGER NOT NULL,
    name VARCHAR(255) DEFAULT NULL,
    description TEXT DEFAULT NULL,
    steps TEXT DEFAULT NULL,
    responsible_user_id INTEGER DEFAULT NULL,
    status VARCHAR(50) DEFAULT NULL,
    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 corrective_actions_incident_idx ON corrective_actions(incident_id);
