silverstripe-framework/tasks/MigrateFileTask.php
Damian Mooyman be239896d3 API Refactor of File / Folder to use DBFile
API Remove filesystem sync
API to handle file manipulations
2015-10-13 11:57:39 +13:00

24 lines
564 B
PHP

<?php
/**
* Migrates all 3.x file dataobjects to use the new DBFile field.
*
* @package framework
* @subpackage filesystem
*/
class MigrateFileTask extends BuildTask {
protected $title = 'Migrate File dataobjects from 3.x';
protected $description
= 'Imports all files referenced by File dataobjects into the new Asset Persistence Layer introduced in 4.0';
public function run($request) {
$migrated = FileMigrationHelper::singleton()->run();
if($migrated) {
DB::alteration_message("{$migrated} File DataObjects upgraded", "changed");
}
}
}