[Rails] Re: rake test fails - pending migrations

2008-12-04 Thread Shantanu Pavgi
Thank you very much for your inputs... - Shantanu. -- Posted via http://www.ruby-forum.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 rubyonr

[Rails] Re: rake test fails - pending migrations

2008-12-04 Thread Phlip
Shantanu Pavgi wrote: > But then what is the purpose of db:migrate:down (and self.down method in > migration file)? On a deployed database, the only direction should be up. If you deploy a new version, and encounter an emergency, the cap rollback feature cannot roll your database back. If the

[Rails] Re: rake test fails - pending migrations

2008-12-04 Thread Ar Chron
Shantanu Pavgi wrote: > Thanks for the help. > > But then what is the purpose of db:migrate:down (and self.down method in > migration file)? The method self.down does roll back any changes if > needed, but its effects are not reflected in other areas such as 'rake > test'. Migrations really s

[Rails] Re: rake test fails - pending migrations

2008-12-04 Thread Shantanu Pavgi
Thanks for the help. But then what is the purpose of db:migrate:down (and self.down method in migration file)? The method self.down does roll back any changes if needed, but its effects are not reflected in other areas such as 'rake test'. I am probably going to do 'rake db:migrate:down' and

[Rails] Re: rake test fails - pending migrations

2008-12-03 Thread James Mitchell
I see. Ok, I see a couple of options here. Some of which have been suggested already. 1. Rip out (svn remove) the migrations you don't want. Reset the db. 2. Add new migrations to add/fix/remove the changes. 3. db:migrate down to the lowest possible version, comment out the the guts of the migra

[Rails] Re: rake test fails - pending migrations

2008-12-03 Thread Bobnation
I'm hoping the same. ;) On Dec 3, 9:17 pm, Phlip <[EMAIL PROTECTED]> wrote: > Bobnation wrote: > > Just remove the migration files themselves or make new migration files > > to remove the columns/tables. > > If your project is not yet deployed (which I suspect it is not!). --~--~-~--~

[Rails] Re: rake test fails - pending migrations

2008-12-03 Thread Phlip
Bobnation wrote: > Just remove the migration files themselves or make new migration files > to remove the columns/tables. If your project is not yet deployed (which I suspect it is not!). --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Rails] Re: rake test fails - pending migrations

2008-12-03 Thread Bobnation
Just remove the migration files themselves or make new migration files to remove the columns/tables. On Dec 3, 6:55 pm, Shantanu Pavgi <[EMAIL PROTECTED]> wrote: > Well, I need to remove some database tables from my application. So I am > using rake db:migrate:down to undo/remove migrations. Also

[Rails] Re: rake test fails - pending migrations

2008-12-03 Thread Shantanu Pavgi
Well, I need to remove some database tables from my application. So I am using rake db:migrate:down to undo/remove migrations. Also, I have changed (added/removed/modified) the code in model, view, controller, and tests to make these changes. Now I need to run tests in order to check everythin

[Rails] Re: rake test fails - pending migrations

2008-12-03 Thread James Mitchell
That's an unusual question. The reason you have tests is to verify your code actually does what you think it's doing. If you migrate down, you add and/or remove model attributes, which (hopefully) your code depends on. And your tests should fail if you change that. That is, if your code doesn't br