Rails 4 throws pending migrations error even if there are no pending migrations -
i upgraded app rails 3.2.15 rails 4.0.4 , rake test fails throwing:
you have 161 pending migrations: 20111126090934 devisecreateusers 20111126195631 addusernametousers 20111128012039 createlocations 20111129051416 addconfirmabletodevise ... run `rake db:migrate` update database try again.
i sure, don't have pending migrations , schema_migrations table up-to date migration version numbers. also,
[2] pry(main)> activerecord::migration.check_pending! activerecord::schemamigration load (0.4ms) select `schema_migrations`.* `schema_migrations` => nil [3] pry(main)>
since, development environment i've tried reset db with:
$> rake db:migrate:reset
i in process of moving app rails 3.2.15 rails 4.0.4. @ loss here, not understanding happening.
$> rake db:migrate:status status migration id migration name -------------------------------------------------- 20111126090934 ********** no file ********** 20111126195631 ********** no file ********** 20111128012039 ********** no file ********** 20111129051416 ********** no file ********** ...
this little weird , frustrating. had sub-folders in db/migrate directory which, though older , migrated, reason getting listed via activerecord::migrator#pending_migrations
, hence error. removing sub-folders fixed issue.
wondering how working in rails 3 , can't find documentation whatsoever regarding this.
Comments
Post a Comment