コード例 #1
0
    protected function configure()
    {
        parent::configure();
        $this->setName('rels:status')->setDescription('Show the state of the relationships table compared to the dump file.')->setHelp(<<<EOH
EOH
);
    }
コード例 #2
0
    protected function configure()
    {
        parent::configure();
        $this->setName('rels:dumptofile')->setDescription('Dump the contents of the table relationships for db migrations.')->setHelp(<<<EOH
Manage the of the dump file based on the relationships table.
EOH
);
        $descriptions = array('add' => 'Add new relationships from the DB to the definition file.', 'del' => 'Delete relationships not present in the DB', 'update' => 'Update the relationships in the DB.');
        $this->setDiffOptions($descriptions);
    }
コード例 #3
0
    protected function configure()
    {
        parent::configure();
        $this->setName('rels:loadfromfile')->setDescription('Load the contents of the table relationships from a file.')->setHelp(<<<EOH
This command modify the database based on a dump file.
Will not do anything by default. Use --force to actually
execute sql queries to impact the database.
EOH
)->addOption('sql', 's', InputOption::VALUE_NONE, 'Print the sql queries that would have been executed.')->addOption('force', 'f', InputOption::VALUE_NONE, 'Really execute the SQL queries to modify the database.');
        $descriptions = array('add' => 'Add new fields from the file to the DB.', 'del' => 'Delete fields not present in the relationships file from the DB.', 'update' => 'Update the DB for modified fields in relationships file.');
        $this->setDiffOptions($descriptions);
    }