From faad73b829405df8edec90e1813f66e8bbfb6b43 Mon Sep 17 00:00:00 2001 From: Peter Thaleikis Date: Sun, 21 Feb 2016 23:59:22 +1300 Subject: [PATCH] Run by default on dev/build --- code/models/ComposerUpdate.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/code/models/ComposerUpdate.php b/code/models/ComposerUpdate.php index 1347ba8..c72ec39 100644 --- a/code/models/ComposerUpdate.php +++ b/code/models/ComposerUpdate.php @@ -13,9 +13,9 @@ class ComposerUpdate extends DataObject * @var array */ private static $db = array( - 'Name' => 'Varchar(255)', - 'Installed' => 'Varchar(255)', - 'Available' => 'Varchar(255)', + 'Name' => 'Varchar(255)', + 'Installed' => 'Varchar(255)', + 'Available' => 'Varchar(255)', ); /** @@ -33,4 +33,15 @@ class ComposerUpdate extends DataObject * @var string */ public $jobName = 'CheckComposerUpdatesJob'; + + /** + * self update on dev/build + */ + public function requireDefaultRecords() + { + parent::requireDefaultRecords(); + + // add a queuedjob on dev/build + singleton('QueuedJobService')->queueJob(new CheckComposerUpdatesJob()); + } }