/** * Execute the Migration command * * @param InputInterface $input [description] * @param OutputInterface $output [description] * @return [type] [description] */ protected function execute(InputInterface $input, OutputInterface $output) { if (!$this->harmless) { $message = 'WARNING! You are about to execute a database migration that could ' . 'result in schema changes and data lost. Do you wish to continue?'; if (!$this->confirm($message)) { $this->error('Process aborted!'); exit(3); } } if ($params = $this->CI->config->item('migration')) { $this->getOption('timestamp') !== FALSE && ($params['migration_type'] = 'timestamp'); $this->CI->load->library('migration', $params); $this->migration = $this->CI->migration; } else { throw new \RuntimeException("Craftsman migration settings does not appear to set correctly."); } $this->setModelArguments(); parent::execute($input, $output); }