/**
* Gets the current database schema, based on the highest version number.
* Note that the .sql files are named based on the version and date, so
* the file name of the last file should match the database schema version
* in the #__schemas table.
*
* @return string the schema version for the database
*
* @since 2.5
*/
public function getSchema()
{
$updateFiles = $this->getUpdateFiles();
// No schema files found - abort and return empty string
if (empty($updateFiles)) {
return '';
}
$result = new \SplFileInfo(array_pop($updateFiles));
return $result->getBasename('.sql');
}