Class: CreateProductCategories

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/forge/db/migrate/20130405172031_create_product_categories.rb

Instance Method Summary collapse

Instance Method Details

#downObject



17
18
19
# File 'lib/forge/db/migrate/20130405172031_create_product_categories.rb', line 17

def down
  drop_table :product_categories
end

#upObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/forge/db/migrate/20130405172031_create_product_categories.rb', line 2

def up
  create_table "product_categories" do |t|
    t.string   "title"
    t.integer  "list_order", :default => 999
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "parent_id"
    t.integer  "sale_id"
  end

  add_index "product_categories", ["list_order"], :name => "index_product_categories_on_list_order"
  add_index "product_categories", ["parent_id"], :name => "index_product_categories_on_parent_id"
  add_index "product_categories", ["sale_id"], :name => "index_product_categories_on_sale_id"
end