ALTER TABLE simplix_fgts_cases
    ADD COLUMN loan_proposal_id INT UNSIGNED NULL AFTER integration_id;

ALTER TABLE simplix_fgts_cases
    ADD CONSTRAINT fk_simplix_case_proposal FOREIGN KEY (loan_proposal_id) REFERENCES loan_proposals (id) ON DELETE SET NULL;

ALTER TABLE simplix_fgts_cases
    ADD INDEX idx_simplix_case_proposal_link (loan_proposal_id);
