public function dropTable($options)
{
extract($options);
if (!isset($schema) && !isset($table)) {
return false;
}
if (!isset($schema)) {
$schema = $this->readSchema($table);
if (isset($schema['tables'][$table])) {
$schema = $schema['tables'][$table];
} else {
return false;
}
}
if (is_array($schema)) {
$name = Inflector::pluralize(Inflector::classify($table));
$options = array('name' => $name, 'connection' => $this->configKeyName, $table => $schema);
$schema = new CakeSchema($options);
}
$sql = $this->dropSchema($schema);
$return = $this->execute($sql);
// とりあえずキャッシュを全て削除
clearCache(null, 'models');
return $return;
}