You are here

function schema_drush_command in Schema 8

Same name and namespace in other branches
  1. 6 schema.drush.inc \schema_drush_command()
  2. 7 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)",
    'category' => 'schema',
    '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",
    'category' => 'schema',
    '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.',
    ),
  );
  $items['schema-fix'] = array(
    'description' => "Attempt to fix incorrect table definitions",
    'category' => 'schema',
    'arguments' => array(),
    'examples' => array(),
  );
  return $items;
}