Skip to content

Instantly share code, notes, and snippets.

# last version had a bug:
# instead of inserting 1 million docs,
# it inserted 8000 docs then updated them 125 times
require 'rubygems'
require 'patron'
require 'json'
COUCH = Patron::Session.new
COUCH.timeout = 120
class AddCategories < ActiveRecord::Migration
def self.up
add_column :tasks, :category, :string
end
def self.down
remove_column :tasks, :category
end
end