How to synchronize development and production database

前端 未结 13 2504
春和景丽
春和景丽 2020-12-23 21:53

Do you know any applications to synchronize two databases - during development sometimes it\'s required to add one or two table rows or new table or column. Usually I write

相关标签:
13条回答
  • 2020-12-23 21:54

    I solve this by using Hibernate. It can detect and autocreate missing tables, columns, etc.

    0 讨论(0)
  • 2020-12-23 21:55

    Have scripts (under source control of course) that you only ever add to the bottom off. That combined with regular restores from your production database to dev you should be golden. If you are strict about it, this works very well.

    Otherwise I know lots of people use redgate stuff for SQLServer.

    0 讨论(0)
  • 2020-12-23 21:55

    Another vote for RedGate SQL Compare

    http://www.red-gate.com/products/SQL_Compare/index.htm

    Wouldn't want to live without it!

    Edit: Sorry, it seems this is only for SQL Server. Still - if any SQL Server users have the same question I'd definitely recommend this tool.

    0 讨论(0)
  • 2020-12-23 21:56

    I really like the EMS tools.

    There tools are available for all popular DB's and you have the same user experience for every type of DB.

    One of the tools is the DB Comparer.

    0 讨论(0)
  • 2020-12-23 21:58

    If you write your SQL statements for your development database (which are, I imagine, series of DDL instructions such as CREATE, ALTER and DROP), why don't you keep track of them by recording them in a table, with a "version" index? You will then be able to:

    1. track your version changes
    2. make a small routine allowing the "automatic" update of your production database by sending the recorded instructions to the database.
    0 讨论(0)
  • 2020-12-23 22:00

    DBV - "Database version control, made easy!" (PHP)

    0 讨论(0)
提交回复
热议问题