function backup_migrate_update_7203 in Backup and Migrate 7.2
Same name and namespace in other branches
- 8.2 backup_migrate.install \backup_migrate_update_7203()
- 8.3 backup_migrate.install \backup_migrate_update_7203()
- 7.3 backup_migrate.install \backup_migrate_update_7203()
Update the schedule last run times to use variables instead of saving with the schedule.
File
- ./
backup_migrate.install, line 399 - Install hooks for Backup and Migrate.
Code
function backup_migrate_update_7203() {
$result = db_query('SELECT * FROM {backup_migrate_schedules}', array(), array(
'fetch' => PDO::FETCH_ASSOC,
));
foreach ($result as $item) {
if (isset($item['last_run'])) {
variable_set('backup_migrate_schedule_last_run_' . $item['schedule_id'], $item['last_run']);
}
}
if (db_field_exists('backup_migrate_schedules', 'last_run')) {
db_drop_field('backup_migrate_schedules', 'last_run');
}
}