Class: AddFieldsToFilter

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/prawn_report/install/templates/20120323124446_add_fields_to_filter.rb

Class Method Summary collapse

Class Method Details

.downObject



12
13
14
15
16
17
18
# File 'lib/generators/prawn_report/install/templates/20120323124446_add_fields_to_filter.rb', line 12

def self.down
  remove_column :ac_filters, :filled_criteria_from
  remove_column :ac_filters, :filled_criteria_to
  remove_column :ac_filters, :required
  remove_column :ac_filters, :required_from
  remove_column :ac_filters, :required_to
end

.upObject



4
5
6
7
8
9
10
# File 'lib/generators/prawn_report/install/templates/20120323124446_add_fields_to_filter.rb', line 4

def self.up
  add_column :ac_filters, :filled_criteria_from, :text
  add_column :ac_filters, :filled_criteria_to, :text
  add_column :ac_filters, :required, :boolean, :default => false
  add_column :ac_filters, :required_from, :boolean, :default => false
  add_column :ac_filters, :required_to, :boolean, :default => false
end