Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

symfony postgresql

doctrine:
dbal:
    default_connection: mysql
    connections:
        mysql:
            url: '%env(DATABASE_URL_MYSQL)%'
            driver: 'pdo_mysql'
            server_version: '5.7'
            charset: utf8mb4
        pgsql:
            url: 'pgsql://userpost:pass123@127.0.0.1:5432/Taller'
            driver: 'pdo_pgsql'
            server_version: '9.3'
            charset: utf8mb4

orm:
    default_entity_manager: pgsql
    entity_managers:
        mysql:
            connection: mysql
            mappings:
                Main:
                    is_bundle: false
                    type: annotation
                    dir: '%kernel.project_dir%/src/Entity'
                    prefix: 'AppEntity'
                    alias: Main
        pg:
            connection: pgsql
            mappings:
                Pg:
                    is_bundle: false
                    type: annotation
                    dir: '%kernel.project_dir%/src/EntityPg'
                    prefix: 'AppEntityPg'
                    alias: Pg
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #symfony #postgresql
ADD COMMENT
Topic
Name
1+7 =