Example #1
10
 /**
  * Command configuration method.
  * Configure all the arguments and options.
  */
 protected function configure()
 {
     parent::configure();
     $this->addArgument('name', InputArgument::REQUIRED, 'Seeder filename')->addOption('path', NULL, InputOption::VALUE_REQUIRED, 'Set the migration path', 'application/seeders/')->addOption('debug', NULL, InputOption::VALUE_NONE, 'If set, the debug mode will show the mysql queries executed');
 }
Example #2
3
 /**
  * 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);
 }
Example #3
1
 /**
  * Command configuration method.
  * Configure all the arguments and options.
  */
 protected function configure()
 {
     parent::configure();
     $this->addArgument('filename', InputArgument::REQUIRED, 'Generator filename')->addArgument('options', InputArgument::IS_ARRAY, 'Options passed to all generated files')->addOption('path', 'p', InputOption::VALUE_REQUIRED, 'Set the generator base path', 'application/')->addOption('force', NULL, InputOption::VALUE_NONE, 'If set, the task will force the generation process')->addOption('timestamp', NULL, InputOption::VALUE_NONE, 'If set, the migration will run with timestamp mode active');
 }
Example #4
0
 /**
  * Command configuration method.
  * Configure all the arguments and options.
  */
 protected function configure()
 {
     parent::configure();
     $this->addOption('host', NULL, InputOption::VALUE_OPTIONAL, 'The host address to serve the application on.', 'localhost')->addOption('port', NULL, InputOption::VALUE_OPTIONAL, 'The port to serve the application on.', 8000)->addOption('docroot', NULL, InputOption::VALUE_OPTIONAL, 'Specify an explicit document root.', FALSE);
 }