/** * To upgrade from 143 to 15 we need to do some work: * 1. execute db patches 42 and 43 * 2. create new tables */ public function Upgrade143to150() { $this->_batch->addTask('Db_AddPatches', 42); $this->_batch->addTask('Db_AddPatches', 43); $this->_batch->addTask('Db_CreateNewTables'); $this->_batch->addTask('Echo', $this->_('Syncing surveys for all sources')); //Now sync the db sources to allow limesurvey source to add a field to the tokentable $model = new \MUtil_Model_TableModel('gems__sources'); $data = $model->load(false); foreach ($data as $row) { $this->_batch->addTask('Tracker_SourceSyncSurveys', $row['gso_id_source']); } return true; }
public function testHasTwoTables() { $model = $this->getNestedModel(); $rows = $model->load(); // error_log(print_r($rows, true)); $this->assertCount(3, $rows); $this->assertCount(2, $rows[0]['n2']); $this->assertCount(0, $rows[1]['n2']); $this->assertCount(3, $rows[2]['n2']); $model = new MUtil_Model_TableModel('n2'); $rows = $model->load(); $this->assertCount(5, $rows); }