1
0
Fork 0
mirror of https://github.com/Oreolek/kohana-migrations.git synced 2024-06-16 15:01:08 +03:00

Refactored the migrate view & removed some var_dump calls

This commit is contained in:
Matt Button 2011-02-18 02:20:47 +00:00
parent fd690e6494
commit e42be14cc6
3 changed files with 2 additions and 8 deletions

View file

@ -117,7 +117,7 @@ class Minion_Task_Db_Migrate extends Minion_Task
->set('quiet', $quiet)
->set('dry_run_sql', $manager->get_dry_run_sql())
->set('executed_migrations', $manager->get_executed_migrations())
->set('group_versions', $model->fetch_current_versions());
->set('group_versions', $model->get_group_statuses());
return $view;
}

View file

@ -368,8 +368,6 @@ class Model_Minion_Migration extends Model
->order_by('timestamp', 'DESC');
}
//var_dump($query->compile($this->_db));
return array($query->execute($this->_db)->as_array(), $up);
}
@ -440,8 +438,6 @@ class Model_Minion_Migration extends Model
$results = $query->execute($this->_db);
//var_dump($query->compile($this->_db));
if ($amount !== NULL AND count($results) != $amount)
{
return array(NULL, $up);

View file

@ -2,9 +2,7 @@
Executed <?php echo count($executed_migrations); ?> migrations
Current versions of groups:
<?php foreach($group_versions as $group): ?>
* <?php echo $group['group'] ?> : <?php echo $group['timestamp'] ?> (<?php echo $group['description']; ?>)
<?php endforeach; ?>
<?php echo new View('minion/task/db/status', array('groups' => $group_versions)) ?>
<?php if($dry_run): ?>
This was a dry run, if it was a real run the following SQL would've been executed: