4 Replies Latest reply on Jul 9, 2008 2:04 AM by edgriffiths

    any suggestions on how to update production database when dev db has had tables added etc

    happysailingdude Level 1
      hi guys, i've been really struggling with this problem and i wondered if anyone has any clever solutions.

      we have a production db (mysql) and a development db (also mysql).

      the production db gets lots of rows added to it throughout the course of the day

      i am working on the dev db and from time to time need to introduce new columns and new tables on the dev db.

      the problems come when it's time to update the production db (by adding the new columns / tables etc) - although i backup the production db and download it and work from that copy. while im working on it new rows are being added to the production db so i cant just upload my amended copy from dev db to prodution (as i would loose those rows).

      what i tend to do is to use php myadmin to 're build' the new tables etc on the production db - but it's a real pain.

      i wonder if there is a clever 'compare the structure of these 2 databases and update 1 in terms of tables/colum structure whilst keeping the data intact' facility in mysql?

      or perhaps i can ask mysql to generate the necessary code that i could then run on the production db to have it amend itself accordingly?

      hope this makes sense! what do you guys do?