-- Add journal_id to expenses and hr_payroll for tracking
ALTER TABLE expenses ADD COLUMN journal_id INT DEFAULT NULL;
ALTER TABLE expenses ADD CONSTRAINT fk_expense_journal FOREIGN KEY (journal_id) REFERENCES accounting_journal(id) ON DELETE SET NULL;

ALTER TABLE hr_payroll ADD COLUMN journal_id INT DEFAULT NULL;
ALTER TABLE hr_payroll ADD CONSTRAINT fk_payroll_journal FOREIGN KEY (journal_id) REFERENCES accounting_journal(id) ON DELETE SET NULL;
