Wednesday, 2 December 2009

Salesforce MySQL backup tool

I've been a little bored recently and working on 'unforced', a php tool to backup your salesforce instance in MySQL (I'm sure a MSSQL conversion wouldn't be too hard). I've been clearing up the code and working on replicating the table relationships from Salesforce to MySQL. Major Adodb problems, mostly due to my stupidly, have been causing problems:
  • MySQL doesn't handle table relationships without tweaking the tables with TYPE=InnoDB;
  • $db->Execute("...") won't handle multiple SQL commands, you can only use one at a time

It now works as you can see above. Problem being, if you create the tables, then the relationships and try to import the data, it creates all sorts of integrity issues as the tables needs to be imported in the correct order. I'll try and solve that one later