mirror of
https://github.com/Oreolek/kohana-migrations.git
synced 2024-06-26 03:40:54 +03:00
Refactored the migrate view & removed some var_dump calls
This commit is contained in:
parent
fd690e6494
commit
e42be14cc6
|
@ -117,7 +117,7 @@ class Minion_Task_Db_Migrate extends Minion_Task
|
||||||
->set('quiet', $quiet)
|
->set('quiet', $quiet)
|
||||||
->set('dry_run_sql', $manager->get_dry_run_sql())
|
->set('dry_run_sql', $manager->get_dry_run_sql())
|
||||||
->set('executed_migrations', $manager->get_executed_migrations())
|
->set('executed_migrations', $manager->get_executed_migrations())
|
||||||
->set('group_versions', $model->fetch_current_versions());
|
->set('group_versions', $model->get_group_statuses());
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
|
@ -368,8 +368,6 @@ class Model_Minion_Migration extends Model
|
||||||
->order_by('timestamp', 'DESC');
|
->order_by('timestamp', 'DESC');
|
||||||
}
|
}
|
||||||
|
|
||||||
//var_dump($query->compile($this->_db));
|
|
||||||
|
|
||||||
return array($query->execute($this->_db)->as_array(), $up);
|
return array($query->execute($this->_db)->as_array(), $up);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -440,8 +438,6 @@ class Model_Minion_Migration extends Model
|
||||||
|
|
||||||
$results = $query->execute($this->_db);
|
$results = $query->execute($this->_db);
|
||||||
|
|
||||||
//var_dump($query->compile($this->_db));
|
|
||||||
|
|
||||||
if ($amount !== NULL AND count($results) != $amount)
|
if ($amount !== NULL AND count($results) != $amount)
|
||||||
{
|
{
|
||||||
return array(NULL, $up);
|
return array(NULL, $up);
|
||||||
|
|
|
@ -2,9 +2,7 @@
|
||||||
Executed <?php echo count($executed_migrations); ?> migrations
|
Executed <?php echo count($executed_migrations); ?> migrations
|
||||||
|
|
||||||
Current versions of groups:
|
Current versions of groups:
|
||||||
<?php foreach($group_versions as $group): ?>
|
<?php echo new View('minion/task/db/status', array('groups' => $group_versions)) ?>
|
||||||
* <?php echo $group['group'] ?> : <?php echo $group['timestamp'] ?> (<?php echo $group['description']; ?>)
|
|
||||||
<?php endforeach; ?>
|
|
||||||
|
|
||||||
<?php if($dry_run): ?>
|
<?php if($dry_run): ?>
|
||||||
This was a dry run, if it was a real run the following SQL would've been executed:
|
This was a dry run, if it was a real run the following SQL would've been executed:
|
||||||
|
|
Loading…
Reference in a new issue