echo DI::l10n()->t('The database version had been set to %s.', $version);
}
+ /**
+ * Drops a specific table
+ *
+ * @param string $table the table name
+ *
+ * @return bool true if possible, otherwise false
+ */
+ public static function dropTable(string $table): bool
+ {
+ return DBA::isResult(DBA::e('DROP TABLE ' . DBA::quoteIdentifier($table) . ';'));
+ }
+
/**
* Drop unused tables
*
$sql = 'DROP TABLE ' . DBA::quoteIdentifier($table) . ';';
echo $sql . "\n";
- $result = DBA::e($sql);
- if (!DBA::isResult($result)) {
+ if (!static::dropTable($table)) {
self::printUpdateError($sql);
}
} else {