I have an instanced web application that uses different databases for every instance but uses the same files.
What I want my application to do on boot:
- Get database credentials from master instance table. This instance table is in the default 'mysql' connection that I have defined in app/config/database.php.
- Connect to the instance database from that point on (I don't need the master instance database anymore)
I have tried to do this in my App:before() event, but that won't work as I don't have a sessions table in my master database. If I do it before the return array() in database.php it obviously can't connect because it doesn't have the correct master database credentials yet.
Where am I supposed to do this? Should I just disable sessions and do it in my App::before() and then enable sessions after?