public function find_migrations()
{
$migrations = array();
// Load all *_*.php files in the migrations path
foreach (glob($this->_migration_path . '*_*.php') as $file) {
$name = basename($file, '.php');
// Filter out non-migration files
if (preg_match($this->_migration_regex, $name)) {
$number = $this->_get_migration_number($name);
// There cannot be duplicate migration numbers
if (isset($migrations[$number])) {
$this->_error_string = sprintf($this->lang->line('migration_multiple_version'), $number);
show_error($this->_error_string);
}
$migrations[$number] = $file;
}
}
ksort($migrations);
return $migrations;
}