function backup_migrate_update_2004 in Backup and Migrate 8.2
Same name and namespace in other branches
- 8.3 backup_migrate.install \backup_migrate_update_2004()
- 6.3 backup_migrate.install \backup_migrate_update_2004()
- 6.2 backup_migrate.install \backup_migrate_update_2004()
- 7.3 backup_migrate.install \backup_migrate_update_2004()
- 7.2 backup_migrate.install \backup_migrate_update_2004()
Allowing non-int profile ids 2009-07-01
File
- ./
backup_migrate.install, line 289 - Install hooks for Backup and Migrate.
Code
function backup_migrate_update_2004() {
$ret = array();
$spec = array(
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '0',
);
$spec['description'] = 'The primary identifier for a destination.';
db_change_field('backup_migrate_destinations', 'destination_id', 'destination_id', $spec);
$spec['description'] = 'The primary identifier for a profile.';
db_change_field('backup_migrate_profiles', 'profile_id', 'profile_id', $spec);
$spec['description'] = 'The primary identifier for a schedule.';
db_change_field('backup_migrate_schedules', 'schedule_id', 'schedule_id', $spec);
// Drop the user/pass fields as they weren't being used.
if (db_field_exists('backup_migrate_destinations', 'username')) {
db_drop_field('backup_migrate_destinations', 'username');
}
if (db_field_exists('backup_migrate_destinations', 'password')) {
db_drop_field('backup_migrate_destinations', 'password');
}
return $ret;
}