I have mine up on a table - not to keep them safe, but because it is easier for me to clean!
But when my kids were small we had birds, and despite a child proof metal cage, with clip locks on every door, my youngest still worked out how to open them one day when she was 2 - cue absolute chaos!
Thankfully eventually we caught the escaped birds and none were hurt, but I learnt a valuable lesson - a motivated toddler can do more than you think.
Most important (imho) would be to make sure the piggies are in a secure cage, with a lid and doors that are not easy to open, and are not in an area that your toddler can not access without supervision. For example after the 'bird incident' we move the cage into a room with a baby gate on the doorway, meaning my daughter could never get in there on her own.