SET NAMES utf8mb4;
ALTER TABLE customer_invoice_lines
 ADD COLUMN IF NOT EXISTS original_invoice_line_id BIGINT UNSIGNED NULL AFTER delivery_note_line_id,
 ADD INDEX IF NOT EXISTS idx_credit_original_line(original_invoice_line_id),
 ADD CONSTRAINT fk_credit_original_line FOREIGN KEY(original_invoice_line_id)REFERENCES customer_invoice_lines(id);
