function drush_schema_inspect in Schema 8
Same name and namespace in other branches
- 6 schema.drush.inc \drush_schema_inspect()
- 7 schema.drush.inc \drush_schema_inspect()
Implements drush_COMMANDFILE_COMMANDNAME().
File
- ./
schema.drush.inc, line 66 - Schema drush commands.
Code
function drush_schema_inspect() {
$args = func_get_args();
$names = explode(',', $args[0]);
$connection = drush_get_option('connection');
if (!$connection) {
$connection = 'default';
}
foreach ($names as $name) {
if ($table = schema_dbobject($connection)
->inspect(NULL, $name)) {
$output = schema_phpprint_table($name, $table[$name]);
drush_print($output);
}
else {
drush_set_error(dt('Mising table: @table', array(
'@table' => $name,
)));
}
}
}