Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
General
Rename a field using DBUtil
Thomas Edwards
January 2012
I've found the modify_fields method, but can't seem to figure out how to rename fields?
Djuki
January 2012
What about modify_fields method ?
http://docs.fuelphp.com/classes/database/dbutil.html#/method_modify_fields
jeezoflip
July 2015
You have to utilize the name field in your query:
\DBUtil::modify_fields('users', array(
'company' => array('constraint' => 255, 'type' => 'varchar',
'name' => 'company_name')
,
));
Where 'company' is the original field you want to modify, and 'name' is what you are renaming it to.
Add a Comment
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
5,089
General
↳ General
3,364
↳ Job Board
13
↳ Installation & Setup
214
Packages
↳ Oil
213
↳ Orm
700
↳ Auth
261
Development
↳ Tips and Tutorials
126
↳ Code share
145
↳ Applications
52
In this Discussion
Djuki
January 2012
jeezoflip
July 2015