mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Merge pull request #154 from assertchris/bug/ignore-missing-widgets-extension
Ignore missing widgets extension
This commit is contained in:
commit
a81ff7067d
@ -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