diff --git a/install_minimal/upgrades/airtime-2.1.0/DbUpgrade.php b/install_minimal/upgrades/airtime-2.1.0/DbUpgrade.php index ed4ac9089..08935b8b3 100644 --- a/install_minimal/upgrades/airtime-2.1.0/DbUpgrade.php +++ b/install_minimal/upgrades/airtime-2.1.0/DbUpgrade.php @@ -12,8 +12,23 @@ class AirtimeDatabaseUpgrade{ private static function task0(){ UpgradeCommon::MigrateTablesToVersion(__DIR__, '20120410143340'); + $sql = "INSERT INTO cc_pref(\"keystr\", \"valstr\") VALUES('scheduled_play_switch', 'on')"; UpgradeCommon::nonSelectQueryDb($sql); + + require_once 'propel/runtime/lib/Propel.php'; + Propel::init(__DIR__."/../../configs/airtime-conf-production.php"); + + $con = Propel::getConnection(CcSchedulePeer::DATABASE_NAME); + + $showInstances = CcShowInstancesQuery::create() + ->setFormatter(ModelCriteria::FORMAT_ON_DEMAND) + ->filterByDbStarts(Criteria::GREATER_EQUAL) + ->find($con); + + foreach ($showInstances as $instance) { + $instance->updateScheduleStatus($con); + } } }