且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用symfony2和php在生产环境中使用doctrine2迁移是安全的

更新时间:2023-11-26 15:15:04

这是迁移的预期用途之一(和优点) - 自动更改您的数据库快速准确。 ,他们可以在大多数情况下应该用于在生产中更新数据库。

This is one of the intended uses (and benefits) of migrations - to automate the changes to your database quickly and accurately. Yes, they can and in most cases should be used to update your database in production.

编辑: Symfony2文档也清楚地解释这是迁移的目的之一。

The Symfony2 documentation also explains clearly this is one of the purposes of migrations.


当然,编写迁移的最终目标是能够在部署应用程序时,使用它们可靠地更新数据库结构。通过在本地(或在beta服务器上)运行迁移,您可以确保迁移按照您期望的方式工作。

Of course, the end goal of writing migrations is to be able to use them to reliably update your database structure when you deploy your application. By running the migrations locally (or on a beta server), you can ensure that the migrations work as you expect.

...