socialforge/db/migrate/20101107130441_add_custom_f...

11 lines
307 B
Ruby
Raw Normal View History

2013-08-01 10:33:49 +08:00
class AddCustomFieldsVisible < ActiveRecord::Migration
def self.up
add_column :custom_fields, :visible, :boolean, :null => false, :default => true
CustomField.update_all("visible = #{CustomField.connection.quoted_true}")
end
def self.down
remove_column :custom_fields, :visible
end
end