db synchronization

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • WebRod

    db synchronization

    Hi,

    I am using MySQL.
    do you know a php script or a software which do this:
    - compare 2 db schemas and update the production schema from the DEV schema.

    Only the schema, not the DATAS!!
    For example:
    - you add a table within your DEV environment -> it creates the table
    (without the data) on the production server
    - you add a field within a table within your DEV environment -> it creates
    adds the field within the same table (and of course set the defaut value of
    all the existing fields for this column) on the production server
    - optionnaly, only if you set a flag, it should remove fields on the
    production environment if it has been removed on the dev environment (but
    not always, only if you set a flag!!)

    All the existing softwares do a "easy" synchronization (mydb etc )!!
    They only create new tables (the full tables) and export datas!!!

    Is there a way to detect news fields and update the schema???

    Many thanks

    Rod



  • jerry gitomer

    #2
    Re: db synchronization

    WebRod wrote:[color=blue]
    > Hi,
    >
    > I am using MySQL.
    > do you know a php script or a software which do this:
    > - compare 2 db schemas and update the production schema from the DEV schema.
    >
    > Only the schema, not the DATAS!!
    > For example:
    > - you add a table within your DEV environment -> it creates the table
    > (without the data) on the production server
    > - you add a field within a table within your DEV environment -> it creates
    > adds the field within the same table (and of course set the defaut value of
    > all the existing fields for this column) on the production server
    > - optionnaly, only if you set a flag, it should remove fields on the
    > production environment if it has been removed on the dev environment (but
    > not always, only if you set a flag!!)
    >
    > All the existing softwares do a "easy" synchronization (mydb etc )!!
    > They only create new tables (the full tables) and export datas!!!
    >
    > Is there a way to detect news fields and update the schema???
    >
    > Many thanks
    >
    > Rod
    >
    >
    >[/color]
    Rod,

    I find your desire to synchronize DEV and Production
    environments quite disturbing because it implies that your
    production environment isn't stable.

    You would be better served by making and testing all changes in
    DEV and then, periodically, making the same changes in
    Production. This would require either a careful "eyeball"
    inspection of the DML or the use of a tool such as ERWin to
    determine the differences in the structure of DEV and Production.

    Once the differences are identified the Production environment
    can be upgraded using ALTER TABLE statements.

    HTH

    Jerry

    Comment

    Working...