mirror of
https://github.com/Oreolek/kohana-migrations.git
synced 2024-06-16 23:11:06 +03:00
Fixing a bug in the migration manager which prevented it from finding migration files
This commit is contained in:
parent
a3636f866f
commit
765e4eddee
|
@ -110,11 +110,17 @@ class Minion_Migration_Manager {
|
|||
|
||||
foreach($location['migrations'] as $migration)
|
||||
{
|
||||
$file = Minion_Migration_Util::get_filename_from_migration($migration);
|
||||
$filename = Minion_Migration_Util::get_filename_from_migration($migration);
|
||||
|
||||
if( ! ($file = Kohana::find_file('migrations', $file)))
|
||||
if( ! ($file = Kohana::find_file('migrations', $filename, FALSE)))
|
||||
{
|
||||
throw new Kohana_Exception('Cannot load migration :migration', array(':migration' => $migration['id']));
|
||||
throw new Kohana_Exception(
|
||||
'Cannot load migration :migration (:file)',
|
||||
array(
|
||||
':migration' => $migration['id'],
|
||||
':file' => $filename
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$class = Minion_Migration_Util::get_class_from_migration($migration);
|
||||
|
|
|
@ -104,6 +104,6 @@ class Minion_Migration_Util {
|
|||
$migration = str_replace('/', ' ', $migration['location']).'_'.$migration['timestamp'];
|
||||
}
|
||||
|
||||
return 'Migration_'.str_replace(' ', '_', ucwords($migration));
|
||||
return 'Migration_'.str_replace(array(' ', '-'), '_', ucwords($migration));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue