summaryrefslogtreecommitdiffstats
path: root/db/migrate/20101107130441_add_custom_fields_visible.rb
blob: 9d59faee5a1ece4fa4ab3756aee845b56798b82b (plain)
1
2
3
4
5
6
7
8
9
10
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