You are here

function bean_update_7003 in Bean (for Drupal 7) 7

Add view_mode field.

File

./bean.install, line 322
Bean installation routines

Code

function bean_update_7003() {
  $spec = array(
    'description' => "The view mode of the bean.",
    'type' => 'varchar',
    'initial' => 'default',
    'length' => 32,
    'not null' => TRUE,
  );
  db_add_field('bean', 'view_mode', $spec);
  db_update('bean')
    ->fields(array(
    'view_mode' => 'default',
  ))
    ->execute();
  return t('Bean view mode field added.');
}