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:
parent
a127951df7
commit
d164f69f6a
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue