【问题标题】:Postgres and MongoDB together in the same project [closed]Postgres和MongoDB一起在同一个项目中[关闭]
【发布时间】:2018-01-15 19:14:39
【问题描述】:

是否可以在同一个项目中使用 Postgresql 和 MongoDB? 我希望能够同时为两者使用生成器。

【问题讨论】:

    标签: ruby-on-rails ruby


    【解决方案1】:

    是的。可以有多个 database.yml 文件等。

    有很多关于在 Rails 中设置多个数据库的文章。 http://www.thegreatcodeadventure.com/managing-multiple-databases-in-a-single-rails-application/ http://www.ostinelli.net/setting-multiple-databases-rails-definitive-guide/

    在使用生成器方面,这篇文章应该会有所帮助:Rails 4: Use MySql and MongoDB together

    【讨论】:

    • 我没有在 Stack 上找到这个链接。这非常有用。
    • 您能否解释一下如何处理迁移和优化池中的连接数以避免由于模型配置错误导致的重复。干杯
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-06-17
    • 1970-01-01
    • 1970-01-01
    • 2021-12-24
    • 2016-10-22
    • 1970-01-01
    • 2013-03-19
    相关资源
    最近更新 更多