使用 DoctrineFixturesBundle 播种生产数据库是否安全? [英] Is it safe to seed production databases with DoctrineFixturesBundle?

查看:11
本文介绍了使用 DoctrineFixturesBundle 播种生产数据库是否安全?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序需要在某些表中出现一些行才能在部署时正常运行.但是,我不确定 DoctrineFixturesBundle 是否被写入运行在生产服务器上.它在我的开发机器上运行良好,但在生产环境中使用是否足够安全?

My application needs some rows to be present in some tables to function properly when it is deployed. However, I'm not sure if the DoctrineFixturesBundle is written to be run on a production server. It works perfectly fine on my development machine, but is it safe enough to use on production?

推荐答案

个人经验

我已将捆绑包与 doctrine/doctrine-migrations-bundle 集成在一起自 2011 年底开始进入多个 symfony2 应用程序的(持续)部署过程.

Personal experience

I have integrated the bundle alongside doctrine/doctrine-migrations-bundle into the (continous) deployment process of several symfony2 applications since end of 2011.

我从来没有遇到过关于fixtures-bundle 的任何问题.

I never ran into any problems with the fixtures-bundle.

我不得不承认,migrations-bundle 有时让我有些头疼——但同时主观上感觉它非常成熟和稳定.

I have to admit that the migrations-bundle occasionally gave me some headaches - but it meanwhile feels very mature and stable subjectively.

doctrine/data-fixtures 于 2010 年年中推出.

doctrine/data-fixtures was introduced in mid 2010.

doctrine/doctrine-fixtures-bundle(要集成的包symfony2 项目)自 2011 年中期以来就存在.

doctrine/doctrine-fixtures-bundle (the bundle to integrate with symfony2 projects) exists since mid 2011.

根据这个 SensioLabs 调查.

It is one of the top 20 most used bundles according to this survey by SensioLabs.

capifony - 广泛使用的 symfony2 应用程序部署工具 - 有 builtin 支持使用捆绑包加载固定装置.

capifony - the widely used deployment tool for symfony2 applications - has builtin support for loading fixtures with the bundle.

doctrine/data-fixtures 有一个很好的 测试覆盖范围.

bundle 本身目前不提供任何测试......但它提供的唯一东西是一个非常简单的命令.看看 代码.

The bundle itself currently doesn't provide any tests ... but the only thing it provides is a very simple command. Have a look at the code.

我会说这个捆绑包对于生产部署绝对是安全的,因为到目前为止我已经这样做了 3 年多.

I'd say the bundle is definitely safe for production deployments as I'm doing so for 3+ years by now.

安装 doctrine/doctrine-fixtures > 200 万-bundle via composer ...我绝对不是唯一一个这样想的人.

With >2 million installs of doctrine/doctrine-fixtures-bundle via composer ... I'm definitely not the only one thinking like that.

这篇关于使用 DoctrineFixturesBundle 播种生产数据库是否安全?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆