Class: CreateHonorPoints

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

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
# File 'lib/generators/honor/install/templates/create_honor_points.rb', line 2

def change
  create_table :points do |t|
    t.integer :user_id
    t.integer :value
    t.string :category
    t.text :message

    t.timestamps
  end
  add_index :points, :user_id
end