On May 20, 10:04 pm, Mk 27 <[email protected]> wrote:
> Being someone who likes to write code and do everything myself this
> rails deal has me grinding my teeth, but I will get over it.
>
> I just noticed after doing a "rake db:migrate" that I mispelled a
> method/column name. So before doing anything else, I corrected the
> spelling in the relevant db/migrate .rb file and ran "rake db:migrate"
> again hoping that would do. However, looking in the db/schema.rb file,
> nothing had changed. So I erased that and the database and tried rake
> again and hopefully everything is fine BUT that is hackish, to say the
> least.
>
rake db:rollback rolls back the last migration you've run
> I've only glanced through the rake docs, --help, etc, and can't find
> anything pertinent to the issue. Anyone nice wanna explain quick?
rake is a fairly generic ruby tool, so the rake documentation is
unlikely to be helpful. in a given context (eg inside your rails
folder) rake -T will list available tasks. The migrations guide
( http://guides.rubyonrails.org/migrations.html#running-migrations )
has some more info.
>
> The other part of my question: does rake affect anything outside db/ ?
rake tasks are arbitrary ruby code. in theory you could have a rake
task that launched a missile at the moon. The tasks that rails
provides in the db: namespace do just fiddle with the database (or
related files like schema.rb)
Fred
> If not, everything should be hunky dory.
>
> Right?
> --
> Posted viahttp://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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---