相关疑难解决方法(0)

使用带有symfony3的postgres数据库


我们使用postgres数据库对Web应用程序进行逆向工程.我们想使用symfony框架重构代码,但是我们在使用数据库时遇到了问题.


目前,我们的项目正在使用MySQL数据库,只是对使用的表使用相同的结构.问题是,现在,我们需要使用postgresql数据库,因为有很多数据,据我们所知,它并没有真正适应MySQL.


我们进行了大量的研究,但是我们没有成功在symfony项目中创建postgresql数据库.
首先,我们尝试应用本教程:http://www.tutodidacte.com/symfony2-utiliser-une-base-de-donnee-postgresql我们尽可能地为我们的项目调整它.这是我们的config.yml

imports:
    - { resource: parameters.yml }
    - { resource: security.yml }
    - { resource: services.yml }

# Put parameters here that don't need to change on each machine where the app is deployed
#     http://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
    locale: en

framework:
    #esi:             ~
    #translator:      { fallbacks: ["%locale%"] }
    secret:          "%secret%"
    router:
        resource: "%kernel.root_dir%/config/routing.yml"
        strict_requirements: ~
    form:            ~
    csrf_protection: ~
    validation:      { enable_annotations: true }
    #serializer:      { enable_annotations: true }
    templating:
        engines: ['twig']
    default_locale: …
Run Code Online (Sandbox Code Playgroud)

php mysql postgresql symfony doctrine-orm

6
推荐指数
1
解决办法
1万
查看次数

如何在Symfony2中使用Doctrine2创建2个连接(mysql和postgresql)

我是Symfony2的新手.我的问题很简单.我会在不同的主机和驱动程序中使用2个连接到DB.

你能帮帮我吗?

symfony doctrine-orm

4
推荐指数
1
解决办法
2399
查看次数

标签 统计

doctrine-orm ×2

symfony ×2

mysql ×1

php ×1

postgresql ×1