# Migrations running errantly

**URL:** <https://www.ruby-forum.com/t/migrations-running-errantly/176735>\
**Category:** Rails\
**Created:** [October 5, 2009, 4:31pm UTC](https://www.ruby-forum.com/t/migrations-running-errantly/176735 "2009-10-05T16:31:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![terrii](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a587f6/32.png) [@terrii](https://www.ruby-forum.com/u/terrii)\
**Post date:** [October 5, 2009, 4:31pm UTC](https://www.ruby-forum.com/t/migrations-running-errantly/176735/1 "2009-10-05T16:31:11Z")

</div>

What would make migrations run unexpectedly?

We ran cap deploy:migrations and did not expect any migrations to run  
since  
none had been changed. The schema\_migrations table was there and  
contained  
the appropriate value for the last valid migration. But for some  
reason, the  
migrations started executing anyway.

Our application was recently upgraded from Rails 1.x to 2.x. Our  
migrations  
use the old one-up numbering scheme. The configuration was not updated  
to  
indicate that the new timestamp naming scheme should not be used. But  
it still  
seemed to work fine in our dev and test environments. It only ran  
errantly on  
production.

What exactly happens to determine if migrations are needed? Has anyone  
ever  
seen this happen, perhaps if something is wrong with the database table  
or  
something else?

Thanks!
