Class: PoseMigrations

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

Class Method Summary (collapse)

Class Method Details

+ (Object) down



19
20
21
22
# File 'lib/generators/templates/migration.rb', line 19

def self.down
  drop_table 'pose_assignments'
  drop_table 'pose_words'
end

+ (Object) up



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/generators/templates/migration.rb', line 2

def self.up
  create_table "pose_assignments" do |t|
    t.integer "pose_word_id",               :null => false
    t.integer "posable_id",                 :null => false
    t.string  "posable_type", :limit => 40, :null => false
  end

  add_index "pose_assignments", :word_id
  add_index "pose_assignments", :wordable_id

  create_table "pose_words" do |t|
    t.string "text", :limit => 80, :null => false
  end

  add_index "words", :text
end