# Skipped migration

**URL:** <https://www.ruby-forum.com/t/skipped-migration/124953>\
**Category:** Rails\
**Created:** [January 4, 2008, 12:42am UTC](https://www.ruby-forum.com/t/skipped-migration/124953 "2008-01-04T00:42:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nootch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/eada6e/32.png) [@nootch](https://www.ruby-forum.com/u/nootch)\
**Post date:** [January 4, 2008, 12:42am UTC](https://www.ruby-forum.com/t/skipped-migration/124953/1 "2008-01-04T00:42:25Z")

</div>

Oddest thing - ran rake db:migrate, as I’ve done many, many times  
before, except this time it skipped one my migrations. Really strange.  
Has anyone ever seen this before? I ran the migration before and it  
worked fine in 2 other environments, one on my local development  
machine and another time during a capistrano task.

I looked at all possibilities I could think of: file permissions (same  
as the others), missing file (it was there), bad syntax (no errors).  
I’m at a loss.

This is the migration it skipped:

class AddToPhones \< ActiveRecord::Migration

def self.up  
add\_column :phones, :hidden, :boolean, :default =\> false  
end

def self.down  
remove\_column :phones, :hidden  
end  
end

Is “hidden” some magic keyword or something? Just a fluke?

---

<div class="post-metadata">

**Author:** ![nootch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/eada6e/32.png) [@nootch](https://www.ruby-forum.com/u/nootch)\
**Post date:** [January 4, 2008, 9:13am UTC](https://www.ruby-forum.com/t/skipped-migration/124953/2 "2008-01-04T09:13:53Z")

</div>

Take a look at the schema.rb version number and the version number of  
table ‘schema-info’ in the database. They should match. I’ve seen  
cases where they don’t, which is quite wrong. Your bug might be  
related to the bug I’ve seen, in which the migration works fine and  
does everything okay except for updating schema.rb. I never saw that  
before Rails 2.0.2. I’ve filed a bug report on it.

fredistic

---

<div class="post-metadata">

**Author:** ![nootch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/eada6e/32.png) [@nootch](https://www.ruby-forum.com/u/nootch)\
**Post date:** [January 4, 2008, 9:25pm UTC](https://www.ruby-forum.com/t/skipped-migration/124953/3 "2008-01-04T21:25:02Z")

</div>

On Jan 3, 2008 6:42 PM, nootch [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> end  
> end
> 
> Is “hidden” some magic keyword or something? Just a fluke?

What’s the filename of the migration?

–  
Rick DeNatale

My blog on Ruby  
[http://talklikeaduck.denhaven2.com/](http://talklikeaduck.denhaven2.com/)

---

<div class="post-metadata">

**Author:** ![nootch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/eada6e/32.png) [@nootch](https://www.ruby-forum.com/u/nootch)\
**Post date:** [January 10, 2008, 5:35pm UTC](https://www.ruby-forum.com/t/skipped-migration/124953/4 "2008-01-10T17:35:44Z")

</div>

043\_add\_to\_phones.rb was the migration name … haven’t seen this  
before or since. Hoping not to…

fredistic - I failed to make the check you suggested, though I do  
recall that the schema\_info table was up to date.

- Noah
