Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
This paste will be private.
class AddEnumTypeColumnToUserEvents < ActiveRecord::Migration def self.up execute("ALTER TABLE user_events ADD COLUMN event_type ENUM('user', 'account') DEFAULT 'user'") #set default execute("UPDATE user_events SET event_type = 'user'") end def self.down execute("ALTER TABLE user_events DROP COLUMN event_type") end end
From the Design Piracy series on my blog: