function backup_migrate_update_6303 in Backup and Migrate 6.3
Add a second destination to schedules.
File
- ./
backup_migrate.install, line 615 - Install hooks for Backup and Migrate.
Code
function backup_migrate_update_6303() {
$ret = array();
foreach (array(
'backup_migrate_sources' => 'source_id',
'backup_migrate_destinations' => 'destination_id',
'backup_migrate_schedules' => 'schedule_id',
'
backup_migrate_profiles' => 'profile_id',
) as $table => $id) {
db_drop_primary_key($ret, $table);
db_change_field($ret, $table, $id, 'machine_name', array(
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
));
db_add_field($ret, $table, $id, array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => 'Primary ID field for the table. Not used for anything except internal lookups.',
'no export' => TRUE,
), array(
'primary key' => array(
$id,
),
));
}
foreach (array(
'backup_migrate_sources',
'backup_migrate_destinations',
) as $table) {
db_change_field($ret, $table, 'type', 'subtype', array(
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
));
}
return $ret;
}