ALTER TABLE operaciones_provincia ADD COLUMN pedido_id INT NULL; ALTER TABLE operaciones_provincia ADD CONSTRAINT fk_operaciones_pedido FOREIGN KEY (pedido_id) REFERENCES pedidos(id) ON DELETE SET NULL;