Class: CreateSizes
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateSizes
- Defined in:
- lib/generators/templates/create_sizes.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
13 14 15 |
# File 'lib/generators/templates/create_sizes.rb', line 13 def self.down drop_table :sizes end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/generators/templates/create_sizes.rb', line 2 def self.up create_table :sizes, :force => true do |t| t.integer :product_id t.string :name t.integer :qty t.integer :display_order, :default => 0 t. end add_index :sizes, :product_id end |