Class: CreateAtriumShowcases

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/atrium/templates/migrations/create_atrium_showcases.rb

Class Method Summary collapse

Class Method Details

.downObject



13
14
15
# File 'lib/generators/atrium/templates/migrations/create_atrium_showcases.rb', line 13

def self.down
  drop_table :atrium_showcases
end

.upObject



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

def self.up
  create_table :atrium_showcases do |t|
    t.text :showcase_items
    #t.integer :atrium_parent_id
    #t.string  :atrium_parent_type
    t.references :showcases,  :polymorphic=>true
  end
  add_index :atrium_showcases, :id
  #add_index :atrium_showcases, :atrium_parent_id, :atrium_parent_type
end