Using Phinx in Codeigniter with custom name and call up / down from a php functionGet the solution ↓↓↓
I have a codeigniter PHP application where a installer wizard involved. When user use this installer upon a button click all tables gets created in db. we also have updater wizard where we have a 'update' button which does execute all new sql (differentiated by a file number... i.e.. update1.sql, update2.sql... and so on...). Now am planning to use 'Phinx' in my application.
All tutorials explains how it is used via command line only. But in my case if i have migrations in phinx classes i want the up() method of appropriate update file to be called when i use update wizard. I unfortunately could not able to locate such tutorial anywhere.
My requirements with phinx as follows... -> update files has to follow incremental number as names. -> Need to call up() function of each update file when a user use update wizard. (same for downgrade... to use down() function) -> for db configuration i want the phinx to use codeigniters database config file.
Can someone help me with a tutorial or hint or sample snippet where can i start with ? I tried for a day now and not finding anything that helps me to start on this... any help would be appreciated.
People are also looking for solutions of the problem: 403 this action is unauthorized.
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.