CodeIgniter Forums
Migration with multiple database - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forum-11.html)
+--- Thread: Migration with multiple database (/thread-67995.html)



Migration with multiple database - ggarzam88 - 05-06-2017

Hi every one, i'm developing a web application that involves multiple database connections for each company registered.
I have one master database that have the information for logins and the company information for the connection to his database.
I want to use migration to update the structure of each database.
With the default migration class i can update the main database without problem but how can i manage the version of each database of the companies on a separate migration folder.

hope you can help me on this scenario.

Thanks


RE: Migration with multiple database - natanfelles - 05-06-2017

I think that you need to do the following:

1. Load your migration config
2. Change your database connection for each company
3. Change your "migration_path" config for each company folder - Look: Migration Preferences
4. Update the company database