How do you manage databases in development, test, and production?

前端 未结 14 2049
情书的邮戳
情书的邮戳 2020-11-30 16:23

I\'ve had a hard time trying to find good examples of how to manage database schemas and data between development, test, and production servers.

Here\'s our setup. E

14条回答
  •  失恋的感觉
    2020-11-30 17:00

    Your developers need to write change scripts (schema and data change) for each bug/feature they work on, not just simply dump the entire database into source control. These scripts will upgrade the current production database to the new version in development.

    Your build process can restore a copy of the production database into an appropriate environment and run all the scripts from source control on it, which will update the database to the current version. We do this on a daily basis to make sure all the scripts run correctly.

提交回复
热议问题