Class: CreateHonorScorecards

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

Instance Method Summary collapse

Instance Method Details

#changeObject



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

def change
  create_table :scorecards do |t|
    t.integer :user_id
    t.integer :daily
    t.integer :weekly
    t.integer :monthly
    t.integer :yearly
    t.integer :lifetime

    t.timestamps
  end
  add_index :scorecards, :user_id
end