You are here

function homebox_update_6003 in Homebox 6

Same name and namespace in other branches
  1. 6.3 homebox.install \homebox_update_6003()
  2. 6.2 homebox.install \homebox_update_6003()

File

./homebox.install, line 99
The install file for Home box allows the module to install (and uninstall) itself. This is required as this module uses its own table.

Code

function homebox_update_6003() {
  $ret = array();
  $field_definition = array(
    'type' => 'int',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 1,
  );
  if (!db_column_exists('homebox_default', 'status')) {
    db_add_field($ret, 'homebox_default', 'status', $field_definition);
  }
  if (!db_column_exists('homebox_default', 'open')) {
    db_add_field($ret, 'homebox_default', 'open', $field_definition);
  }
  return $ret;
}