Class: Tables::Rules

Inherits:
Base
  • Object
show all
Defined in:
lib/forcast/migrations/rule_engine/rules.rb

Class Method Summary collapse

Class Method Details

.table(migration) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/forcast/migrations/rule_engine/rules.rb', line 5

def self.table(migration)
  create_table migration do |t|
    t.string   :name
    t.string   :rule_model
    t.integer  :rule_model_id
    t.string   :value_s
    t.integer  :value_i
    t.decimal  :value_d
    t.boolean  :value_b
    t.datetime :value_t
    t.string   :rule
    t.string   :rule_type
    t.string   :rule_class
    t.string   :combine_type
    t.string   :attr_comparable
    t.string   :last_value_attr_comparable
    t.boolean  :class_rule?
    t.boolean  :active?
    t.timestamps
  end
end