SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    May 2006
    Posts
    118
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Version Control with MySQL databases

    Hey,

    I've been working on a project using SVN running on the production server and we have developers running local copies of MySQL and commit a sql dump every time they commit a change involving the MySQL database schema.

    However, this is becoming quite inconvenient to have to dump the database on commits and reimport it on checkout (also deleting any testing data the developer might have added) along with the added bandwidth overhead.

    I've considered allowing access to the MySQL server on the production server but then it would add unwanted delay to testing locally and restrict developers to playing around with the schema in fear of breaking the database for someone else working on it. Also it would become impossible to track SQL database changes with each revision.

    Just wondering how you manage this problem/know of any solutions?

    Thanks,

    Tom

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    At one place I worked, we kept the schema and test data (as CREATE TABLE and INSERT queries) in a few .sql files and kept those files up to date on the repository. If you saw one of them change, then you could simply execute the SQL files to update your schema and repopulate the test data.

    If you want to eliminate the need for each person to do that, then you could create a shared development database that everyone points to while working. Then only whoever is changing things has to remember to update the database schema/data.

  3. #3
    SitePoint Member
    Join Date
    Apr 2005
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Checkout my article, this is CakePHP specific but you'll get an idea.

    http://www.gigapromoters.com/blog/20...rsion-control/


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •