Create MySQL Tables without using Database Forge Class |
Hi,
I am wondering is it possible to execute the raw MySQL CREATE TABLE commands with all columns and accompanying definitions in CodeIgniter 4 instead of using the Database Forge Class? I am parsing a special .fxl file (which is structured quite similar to an .xml file) and using all the information within the file to create tables with columns and definitions. In my specific case, building up the raw MySQL queries into the complete query string would be better. (10-27-2021, 01:40 PM)josh2112o Wrote: Hi,I guess I should have looked better before posting the question here but it looks like I can use the $db connection in a model and run the CREATE TABLE statements.
use forge for migration is alot easier and good practise. in case we need to pass our project to next person.
[quote pid="391088" dateline="1635459429"]
Thanks for the suggestion brother, it works just fine. [/quote] |
Welcome Guest, Not a member yet? Register Sign In |