Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am using a version control system to manage my wordpress code (git). What is the betst way to store the database information into version control?

I want to go to my staging machine, run git pull to get the latest code from my development machine, then maybe click one button or something like that to update the DB to match what I have on my development computer.

I also want a way to, on my stage machine, "merge" the my development DB with the production DB before pushing all of that to production.

so:

  1. how to update a DB after a git pull
  2. how to "merge" DB information.
share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

This is more a git question than a WordPress one IMHO, but what you need to do is write a bash script and associate with a git hook that does what you want.

share|improve this answer
add comment

You can easily connect Git to SSMS using SQL Source Control from Red Gate Software - more information, including a 28-day free trial at http://www.red-gate.com/products/sql-development/sql-source-control/

share|improve this answer
    
SQL Source Control is for versioning Microsoft SQL Server databases, not MySQL. –  Ian Dunn Aug 4 '12 at 0:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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