pastie/sake for "rake db:migrate:down"

I made a friendly alias to rake db:migrate VERSION=0 (got tired of
writing it all the time)
Feel free to use it.

# add alias to "rake db:migrate VERSION=0"
# that can be called without extra parameters
namespace :db do
  namespace :migrate do
    desc "Alias for db:migrate VERSION=0"
    task :down => :environment do
      puts "migrates down to version 0 of database"
      ActiveRecord::Migrator.migrate("db/migrate/", 0)
      Rake::Task["db:schema:dump"].invoke if
ActiveRecord::Base.schema_format == :ruby
    end
  end
end

I vaguely recall that I have read that it's possible to put snippets
out as pasties, so that everybody can use it as a sake task.

Could someone please explain me how?

Thanks"

/Jesper
blog: www.justaddwater.dk

Found an answer via the Copenhagen.rb mailing list:

sake -i http://pastie.caboo.se/105729.txt

/Jesper
blog: www.justaddwater.dk