1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45:
<?php
namespace Inlm\SchemaGenerator\Bridges\PhpCli;
use Inlm\SchemaGenerator;
use CzProject\PhpCli\Application\ICommand;
use CzProject\PhpCli\Console;
class InitFromDatabaseCommand implements ICommand
{
private $integration;
public function __construct(SchemaGenerator\IIntegration $integration)
{
$this->integration = $integration;
}
public function getName()
{
return 'schema-init-from-database';
}
public function getDescription()
{
return 'Inits schema file & creates first SQL migrations from current database.';
}
public function getOptions()
{
return array();
}
public function run(Console $console, array $options, array $arguments)
{
$this->integration->initFromDatabase();
}
}