1
0
mirror of https://github.com/fspc/BikeShed-1.git synced 2025-03-01 01:03:23 -05:00
BikeShed-1/db/migrate/20130629152047_create_credit_conversions.rb
Jason Denney 7736ac5c34 Added credit tracking and stats
Added credit_conversions table so conversions can change over time
Added default credit conversion fixture
Added User#transaction_logs
Added User#total_credits (earned minus spent)
Added User#total_credits_spent (through transaction_logs)
Added User#total_earned_credits (complicated query which finds the conversion rate for a log depending on its created_at date)
2013-06-29 15:19:38 -04:00

9 lines
195 B
Ruby

class CreateCreditConversions < ActiveRecord::Migration
def change
create_table(:credit_conversions) do |t|
t.integer :conversion, :default => 1
t.timestamps
end
end
end