0

I have a situation where I need to check the changes (what tables) were done at database level after a particular date as the two databases have to be merged now. Is there any tool or module in Drupal that can fulfill this requirement.

Scenario: My client has given me the database (code also) of his current site to work on. He also did some changes meanwhile (at database level only maybe content) on his live site.

Now I need to integrate these changes into my database, but he did not record the changes that were done. What would be the best solution?

What I have done: I wrote a query fetching records from node table showing all the changes done after the particular date and manually updated his changes into mine. Am I missing something else?

3
  • I am using Drupal7. Jul 3, 2014 at 6:25
  • dblog and syslog tells only about events (these are helpful in debugging an error in script), but not fulfilling my requirement Jul 3, 2014 at 6:27
  • Is that original database also a Drupal database? If not what is its format? Like MS Sql, Oracle, MySQL, etc? May 23, 2015 at 18:37

1 Answer 1

0

There are a couple of ways I could think I would approach this issue:

  1. If the changes made by me in the old database are reproducible easily to the new database, I'd go for it first. And in most of the cases if you follow Drupal best practices like using update hooks, alter functions, etc. they could be easily done to the new database by (sometimes) running only update.php
    So, I'd recommend to move all the custom changes to the update hooks if you have time. Because, considering that the site is live, you could expect more changes to the database. And your code should be flexible enough; unless off course if you could convince the client to stop updating the live site.

  2. If you are sure no database level changes would be done (which I doubt, Drupal being a database driven framework), you could use some tools for comparing the changes between the two databases. Check this stackoverflow question for list of tools that could be used. Take a diff of the database, find out the tables which have differences. From the tables, find out which entities are added/removed from the database. And then make the changes to as required.
    I would not recommend this method over the first.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.