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? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Jan 3, 2008 6:42 PM, nootch <noah.box-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > 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?What''s the filename of the migration? -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 On Jan 4, 3:24 pm, "Rick DeNatale" <rick.denat...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Jan 3, 2008 6:42 PM,nootch<noah....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > 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? > > What''s the filename of the migration? > > -- > Rick DeNatale > > My blog on Rubyhttp://talklikeaduck.denhaven2.com/--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---