mirror of
https://github.com/Oreolek/kohana-migrations.git
synced 2024-05-05 02:28:16 +03:00
fix migrations in 3.3.x
This commit is contained in:
parent
526e589f3d
commit
09da9b1c0e
|
@ -28,16 +28,16 @@
|
|||
*
|
||||
* @author Matt Button <matthew@sigswitch.com>
|
||||
*/
|
||||
class Minion_Task_Migrations_New extends Minion_Task
|
||||
class Task_Migrations_New extends Minion_Task
|
||||
{
|
||||
/**
|
||||
* A set of config options that this task accepts
|
||||
* @var array
|
||||
*/
|
||||
protected $_options = array(
|
||||
'location' => APPPATH,
|
||||
'description' => '',
|
||||
'group' => NULL,
|
||||
'description' => NULL,
|
||||
'location' => NULL,
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -61,14 +61,6 @@ class Minion_Task_Migrations_New extends Minion_Task
|
|||
|
||||
public function generate($options, $up = null, $down = null)
|
||||
{
|
||||
$defaults = array(
|
||||
'location' => APPPATH,
|
||||
'description' => '',
|
||||
'group' => NULL,
|
||||
);
|
||||
|
||||
$options = array_merge($defaults, $options);
|
||||
|
||||
// Trim slashes in group
|
||||
$options['group'] = trim($options['group'], '/');
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
*
|
||||
* @author Matt Button <matthew@sigswitch.com>
|
||||
*/
|
||||
class Minion_Task_Migrations_Run extends Minion_Task
|
||||
class Task_Migrations_Run extends Minion_Task
|
||||
{
|
||||
/**
|
||||
* A set of config options that this task accepts
|
||||
|
@ -53,11 +53,11 @@ class Minion_Task_Migrations_Run extends Minion_Task
|
|||
protected $_options = array(
|
||||
'group' => NULL,
|
||||
'groups' => NULL,
|
||||
'up' => NULL,
|
||||
'down' => NULL,
|
||||
'to' => NULL,
|
||||
'dry-run' => NULL,
|
||||
'quiet' => NULL,
|
||||
'up' => FALSE,
|
||||
'down' => FALSE,
|
||||
'dry-run' => FALSE,
|
||||
'quiet' => FALSE,
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -69,13 +69,13 @@ class Minion_Task_Migrations_Run extends Minion_Task
|
|||
{
|
||||
$k_config = Kohana::$config->load('minion/migration');
|
||||
|
||||
$groups = Arr::get($options, 'group', Arr::get($options, 'groups', NULL));
|
||||
$target = Arr::get($options, 'to', NULL);
|
||||
$groups = $options['group'];
|
||||
$target = $options['to'];
|
||||
|
||||
$dry_run = array_key_exists('dry-run', $options);
|
||||
$quiet = array_key_exists('quiet', $options);
|
||||
$up = array_key_exists('up', $options);
|
||||
$down = array_key_exists('down', $options);
|
||||
$dry_run = $options['dry-run'] !== FALSE;
|
||||
$quiet = $options['quiet'] !== FALSE;
|
||||
$up = $options['up'] !== FALSE;
|
||||
$down = $options['down'] !== FALSE;
|
||||
|
||||
$groups = $this->_parse_groups($groups);
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
*
|
||||
* @author Matt Button <matthew@sigswitch.com>
|
||||
*/
|
||||
class Minion_Task_Migrations_Status extends Minion_Task {
|
||||
class Task_Migrations_Status extends Minion_Task {
|
||||
|
||||
/**
|
||||
* Execute the task
|
Loading…
Reference in a new issue