Search code examples
codeignitercodeigniter-3

Codeigniter and multiple postgre schema


im using the development version of Codeigniter 3.0.

I can see that there is a Schema property to the $db config. But it doesnt look like its using it for anything atm. as my script wont connect to multiple schemas.

Does anyone know how to setup CI with multiple Schemas in postgre?


Solution

  • Here is the solution by the CI Developers. https://github.com/EllisLab/CodeIgniter/commit/485a348a7a633d38f69a963e9f77e23077f75d11

    I recommend you to download only the folder 'database' from this link of your CI system/core and add to your application/config/database.php the line...

    $db['default']['schema'] = 'NAME_OF_YOUR_SCHEMA';
    

    or if you are using with a array list, something like this:

    $db['default'] = array('schema'=>'NAME_OF_YOUR_SCHEMA');