1
0
Fork 0
mirror of https://github.com/Oreolek/kohana-migrations.git synced 2024-06-26 03:40:54 +03:00

Added db/model setters to the migration manager

This commit is contained in:
Matt Button 2010-12-29 04:26:43 +00:00
parent a127951df7
commit d164f69f6a

View file

@ -38,6 +38,32 @@ class Minion_Migration_Manager {
$this->_model = $model;
}
/**
* Set the database connection to be used
*
* @param Kohana_Database Database connection
* @return Minion_Migration_Manager
*/
public function set_db(Kohana_Database $db)
{
$this->_db = $db;
return $this;
}
/**
* Set the model to be used in the rest of the app
*
* @param Model_Minion_Migration Model instance
* @return Minion_Migration_Manager
*/
public function set_model(Model_Minion_Migration $model)
{
$this->_model = $model;
return $this;
}
/**
* Run migrations in the specified locations so as to reach specified targets
*