ALTER TABLE plannedconsignments_tpdetails
ADD COLUMN clearing_agent_id INTEGER;

ALTER TABLE plannedconsignments_tpdetails
ADD CONSTRAINT fk_clearing_agent
FOREIGN KEY (clearing_agent_id)
REFERENCES clearing_agents (id)
ON DELETE SET NULL;
