Class: CreateExpansionAttributes

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/expansion/templates/create_expansion_attributes.rb

Class Method Summary collapse

Class Method Details

.downObject



13
14
15
# File 'lib/generators/expansion/templates/create_expansion_attributes.rb', line 13

def self.down
  drop_table :expansion_attributes
end

.upObject



2
3
4
5
6
7
8
9
10
11
# File 'lib/generators/expansion/templates/create_expansion_attributes.rb', line 2

def self.up
  create_table :expansion_attributes do |t|
    t.string  :model_name
    t.string  :name
    t.string  :value_type
    t.boolean :is_multiple

    t.timestamps
  end
end