I need to rename one of my fields in a table via a .install file. How can I to do this ?
Let us consider I have a table called "register" and field name called "fname". Now I need to change the field name "fname" to "name". How can I do this using a .install file?
We can add a field for a table using the below syntax :
db_add_field($ret, 'table_name', 'field_name', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE,));
What is the syntax for doing a field rename?