gpt4 book ai didi

symfony - 生产环境如何使用数据库装置

转载 作者:行者123 更新时间:2023-12-02 21:13:39 24 4
gpt4 key购买 nike

我想知道如何在生产环境中使用 Doctrine 装置。例如,当我想预定义一组固定的权限或 super 用户等时。

Doctrine documentation states :

Fixtures are used to load a "fake" set of data into a database thatcan then be used for testing or to help give you some interestingdata while you're developing your application.

因此我不想使用灯具本身,因为这违背了它的概念。

有什么想法吗?

最佳答案

我找到了一个很好的答案 here :

Typically the recommended thing to do is to use migrations. Run thefixture code with dump-sql on, and move that into a migration that canbe consistently deployed in any server.

关于symfony - 生产环境如何使用数据库装置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47902191/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com