You are here

function backup_migrate_update_2004 in Backup and Migrate 6.3

Same name and namespace in other branches
  1. 8.2 backup_migrate.install \backup_migrate_update_2004()
  2. 8.3 backup_migrate.install \backup_migrate_update_2004()
  3. 6.2 backup_migrate.install \backup_migrate_update_2004()
  4. 7.3 backup_migrate.install \backup_migrate_update_2004()
  5. 7.2 backup_migrate.install \backup_migrate_update_2004()

Allowing non-int profile ids 2009-07-01

File

./backup_migrate.install, line 386
Install hooks for Backup and Migrate.

Code

function backup_migrate_update_2004() {
  $ret = array();
  $spec = array(
    'type' => 'varchar',
    'length' => 255,
    'not null' => TRUE,
    'default' => '0',
  );
  $spec['description'] = t('The primary identifier for a destination.');
  db_change_field($ret, 'backup_migrate_destinations', 'destination_id', 'destination_id', $spec);
  $spec['description'] = t('The primary identifier for a profile.');
  db_change_field($ret, 'backup_migrate_profiles', 'profile_id', 'profile_id', $spec);
  $spec['description'] = t('The primary identifier for a schedule.');
  db_change_field($ret, 'backup_migrate_schedules', 'schedule_id', 'schedule_id', $spec);

  // Drop the user/pass fields as they weren't being used.
  if (db_column_exists('backup_migrate_destinations', 'username')) {
    db_drop_field($ret, 'backup_migrate_destinations', 'username');
  }
  if (db_column_exists('backup_migrate_destinations', 'password')) {
    db_drop_field($ret, 'backup_migrate_destinations', 'password');
  }
  return $ret;
}