Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

readme.md

MultiDb module for Codeception

This module based on original Db module

Installation

composer require iamdevice/codeception-multidb

Config example

modules:
   enabled:
     - MultiDb
   config:
     MultiDb:
       connections:
         masterDb:
           dsn: 'mysql:host=localhost;port=3306;dbname=database'
           user: 'username'
           password: 'password'
           primary: true
           dump: ''
           populate: true
           cleanup: false
           reconnect: true
         slaveDb:
           dsn: 'mysql:host=localhost;port=3307;dbname=database'
           user: 'username'
           password: 'password'
           dump: ''
           populate: true
           cleanup: false
           reconnect: true

Before actions with base you need to select Db like

$I->amConnectedToDb('primary')

or you must define one of the connections as primary with

primary: true

Aleksandr Kozhevnikov © 2017

About

Work with multiple databases

Resources

Languages

You can’t perform that action at this time.