I am thinking of writing a database management module....
Posted: Sun Jun 01, 2008 2:14 am
(For goodness sake, please response II) 

Now that I got your attention, let me hear your ideas. I am thinking of writing a database management module that can backups, restore, copy, and most importantly merge and synchronize databases together. Backups, restore, and copy is easily done but the merging part is quite complicated especially when I don't know for use the structure of each table in the database.
I am toying with the idea of maybe adding an index and a last updated timstamp column to each of the table in the database to help monitor each row modifications. Then when the time comes to merge, check each table last modification date and if there are different, we check the individual rows. Obviously, this is going to take a lot of time because we have so many table and most web hosts sets a limit on the execution to be 30 seconds. So, to bypass that, I will probably implement some kind of AJAX mechanism that stops what it is doing after it has run for more than 25 seconds but remembers where it was at so it can continue from where it left off. When it is done, it would allow the user to select the action to take if it.
Not perfect by any stretch but it is at least an idea. There are a lot of edge cases because of all the references and associations we have with CMS Made Simple but I think for the most part, this should do pretty well. I love to hear some other ideas on how to tackle this merging database situations though.