Welcome Guest, Not a member yet? Register   Sign In
Migration w/Multiple Table Prefixes
#1

I have searched through the documentation and have not been successful in finding the answer but, is there any way to apply a migration to several tables with different prefixes at once?:
client1_sessions
client1_users
client1_profile
client2_sessions
client2_users
client2_profile

Any help would be appreciated. Thanks in advance!
Reply
#2

A migration is just a PHP class. You can loop through all your prefixes, build the table name with the right prefix and call the Forge function with that.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply




Theme © iAndrew 2016 - Forum software by © MyBB