kohana / minion

Everyone loves having a minion they can boss around
113 stars 76 forks source link

Minion_Migration_Util::get_class_from_migration() returning incorrect class name when location is empty #4

Closed ahutchings closed 13 years ago

ahutchings commented 13 years ago

If I run the following command php public/index.php --uri=minion/db:generate --location=application/migrations/ --description="Add one-to-many relationship"

the migration class name that results is Migration_20110107011624

When I try to run the migrations this exception is thrown ErrorException [ 1 ]: Class 'Migration_._20110107001421' not found ~ MODPATH/minion/classes/minion/migration/manager.php [ 185 ]

BRMatt commented 13 years ago

I'm tempted to reject this, in my opinion migrations in the application should be placed in a folder structure such as "application/migrations/app" or "application/migrations/application".

ahutchings commented 13 years ago

That does make sense. Perhaps this should be a documentation issue instead, or the db:generate task could reject invalid locations, or both.

BRMatt commented 13 years ago

Moving this over to https://github.com/kohana-minion/tasks-migrations