mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Ignore missing widgets extension
This commit is contained in:
parent
199653197e
commit
541822de92
@ -54,8 +54,11 @@ class BlogMigrationTask extends MigrationTask {
|
|||||||
* @param type $stage
|
* @param type $stage
|
||||||
*/
|
*/
|
||||||
protected function upClass($class, $stage = null) {
|
protected function upClass($class, $stage = null) {
|
||||||
|
if(!class_exists($class)) return;
|
||||||
|
|
||||||
// Migrate all records
|
// Migrate all records
|
||||||
$items = $class::get();
|
$items = $class::get();
|
||||||
|
|
||||||
if($count = $items->count()) {
|
if($count = $items->count()) {
|
||||||
$stageMessage = " in stage {$stage}";
|
$stageMessage = " in stage {$stage}";
|
||||||
$this->message("Migrating {$count} legacy {$class} records{$stageMessage}.");
|
$this->message("Migrating {$count} legacy {$class} records{$stageMessage}.");
|
||||||
|
Loading…
Reference in New Issue
Block a user