Class: CreateAchievementConditions

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/rails/generators/triumph/templates/20110712033351_create_achievement_conditions.rb

Class Method Summary collapse

Class Method Details

.downObject



15
16
17
# File 'lib/rails/generators/triumph/templates/20110712033351_create_achievement_conditions.rb', line 15

def self.down
  drop_table :achievement_achievements
end

.upObject



2
3
4
5
6
7
8
9
10
11
12
13
# File 'lib/rails/generators/triumph/templates/20110712033351_create_achievement_conditions.rb', line 2

def self.up
  create_table :achievement_conditions do |t|
    t.integer :achievement_id
    t.string  :comparison_attribute
    t.string  :comparison_operator
    t.string  :comparison_value
    t.string  :total_operator
    t.integer :total_value
    
    t.timestamps
  end
end