You are here

function drush_schema_inspect in Schema 6

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

A drush command callback.

File

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

Code

function drush_schema_inspect() {
  $args = func_get_args();
  $names = explode(',', $args[0]);
  foreach ($names as $name) {
    if ($table = schema_invoke('inspect', $name)) {
      $output = schema_phpprint_table($name, $table[$name]);
      drush_print($output);
    }
    else {
      drush_set_error(dt('Mising table: @table', array(
        '@table' => $name,
      )));
    }
  }
}