You are here

function hosting_site_update_5 in Hosting 7.3

Same name and namespace in other branches
  1. 6.2 site/hosting_site.install \hosting_site_update_5()
  2. 7.4 site/hosting_site.install \hosting_site_update_5()

Implements hook_update_N().

Turn the bid column of hosting_site_backups into a serial field

Required by Drupal 6 update.

File

site/hosting_site.install, line 205
Define database schema and update functions for the hosting_site module.

Code

function hosting_site_update_5() {
  $ret = array();
  db_drop_primary_key($ret, 'hosting_site_backups');
  db_field_set_no_default($ret, 'hosting_site_backups', 'bid');
  db_change_field($ret, 'hosting_site_backups', 'bid', 'bid', array(
    'type' => 'serial',
    'not null' => TRUE,
  ), array(
    'primary key' => array(
      'bid',
    ),
  ));
  return $ret;
}