mirror of
https://github.com/Oreolek/kohana-migrations.git
synced 2024-06-28 20:55:08 +03:00
Updated the migration manager with some comments relevant to the previous commit
This commit is contained in:
parent
66b3297c34
commit
1207916227
|
@ -25,13 +25,53 @@ class Minion_Migration_Manager {
|
|||
$this->_db = $db;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run migrations in the specified locations so as to reach specified targets
|
||||
*
|
||||
* There are three methods for specifying target versions:
|
||||
*
|
||||
* 1. Pass them in with the array of locations, i.e.
|
||||
*
|
||||
* array(
|
||||
* location => target_version
|
||||
* )
|
||||
*
|
||||
* 2. Pass them in separately, with param1 containing an array of
|
||||
* locations like:
|
||||
*
|
||||
* array(
|
||||
* location,
|
||||
* location2,
|
||||
* )
|
||||
*
|
||||
* And param2 containing an array structured in the same way as in #1
|
||||
*
|
||||
* 3. Perform a mix of the above two methods
|
||||
*
|
||||
* It may seem odd to use two arrays to specify locations and versions, but
|
||||
* it's this way to allow users to upgrade / downgrade all locations while
|
||||
* migrating a specific location to a specific version
|
||||
*
|
||||
* If no locations are specified then migrations from all locations will be
|
||||
* run and be brought up to the latest available version
|
||||
*
|
||||
* @param array Set of locations to update, empty array means all
|
||||
* @param array Versions for specified locations
|
||||
* @param boolean The default direction (up/down) for migrations without a specific version
|
||||
* @return boolean Whether
|
||||
*/
|
||||
public function run_migration(array $locations = array(), $versions = array(), $default_direction = TRUE)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Syncs all available migration files with the database
|
||||
*
|
||||
* @chainable
|
||||
* @return Minion_Migration_Manager Chainable instance
|
||||
*/
|
||||
public function sync()
|
||||
public function sync_migration_files()
|
||||
{
|
||||
$model = new Model_Minion_Migration($this->_db);
|
||||
|
||||
|
|
Loading…
Reference in a new issue