Class: CreateFlexiModelValues

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/flexi_model/install/templates/create_flexi_model_values.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/generators/flexi_model/install/templates/create_flexi_model_values.rb', line 2

def change
  create_table 'flexi_model_values', :force => true do |t|
    t.integer 'record_id'
    t.integer 'field_id'
    t.boolean 'bool_value'
    t.integer 'int_value'
    t.decimal 'dec_value'
    t.string 'str_value'
    t.text 'txt_value'
    t.datetime 'dt_value'
  end

  add_index 'flexi_model_values', [:record_id, :field_id]

end