Class: CreateBanners

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

Instance Method Summary collapse

Instance Method Details

#downObject



17
18
19
# File 'lib/forge/db/migrate/20130405172036_create_banners.rb', line 17

def down
  drop_table :banners
end

#upObject



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

def up
  create_table "banners" do |t|
    t.string   "title"
    t.string   "photo_file_name"
    t.string   "photo_content_type"
    t.integer  "photo_file_size"
    t.boolean  "published",          :default => true
    t.integer  "list_order",         :default => 999
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "banners", ["list_order"], :name => "index_banners_on_list_order"
end