You are here

function schema_drush_command in Schema 7

Same name and namespace in other branches
  1. 8 schema.drush.inc \schema_drush_command()
  2. 6 schema.drush.inc \schema_drush_command()

Implementation of hook_drush_command().

File

./schema.drush.inc, line 11
Schema drush commands.

Code

function schema_drush_command() {
  $items = array();

  // the key in the $items array is the name of the command.
  $items['schema-inspect'] = array(
    'description' => "Show the Drupal schema definition for table(s)",
    'arguments' => array(
      'tables' => 'A comma delimited list of table names',
    ),
    'options' => array(
      'connection' => 'An alternate connection key to inspect',
    ),
  );
  $items['schema-compare'] = array(
    'description' => "List tables that match, mismatch, are missing or are extra",
    'arguments' => array(
      'type' => 'The type of tables to list, one of "match", "mismatch", "missing" or "extra".',
    ),
    'examples' => array(
      'drush schema-compare match' => 'List all tables in the database whose schemas match their schema definitions.',
      'drush schema-compare mismatch' => 'List all tables in the database whose schemas do not match their schema definitions.',
      'drush schema-compare missing' => 'List all missing tables from the database existing in schema definitions.',
      'drush schema-compare extra' => 'List all tables in the database whose schema definitions do not exist.',
    ),
  );
  return $items;
}