I need to delete some old columns of existing table. How to do it using hook_update
or Is there some other way to delete old columns in .install
file .
Thanks
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityYou can use function db_drop_field()
/**
* Implements hook_update_N().
*/
function mymodule_update_7001() {
db_drop_field('my_table', 'my_column');
}