I'm having an issue with database columns/fields. Whenever I insert a column using the DBUtil::add_fields() function, it always adds the field(s) at the end of the table no matter what. Within our system, we need to have these columns in a specific order within the table. Generally, I'd use an ALTER TABLE command in MySQL to do this, however I just can't figure out how to do this using FuelPHP's DB::query() function. It seems to only allow the use of INSERT, UPDATE, DELETE and DROP commands only. I should point out that I am using FuelPHP's migrations via OIL when I'm attempting this.
If anyone knows of a simple way that I'm not seeing to do this, it would be greatly appreciated. Having new columns at the end of our tables is becoming quite annoying.
Thanks again for your help! I initially tried the "after" key in the modify_fields() function to no avail. But then I remembered that MySQL requires you to re-specify the column name and it's field type. Once I added that in, it worked like a charm.
Thanks again for you help with this. It was driving me crazy. :)