From 70b7b33909ecf58517cd99e59f8a80548933686d Mon Sep 17 00:00:00 2001 From: Jason Denney Date: Wed, 5 Dec 2012 00:07:04 -0500 Subject: [PATCH] Adding transaction migration --- db/migrate/20121205043759_create_transactions.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 db/migrate/20121205043759_create_transactions.rb diff --git a/db/migrate/20121205043759_create_transactions.rb b/db/migrate/20121205043759_create_transactions.rb new file mode 100644 index 0000000..86f5222 --- /dev/null +++ b/db/migrate/20121205043759_create_transactions.rb @@ -0,0 +1,16 @@ +class CreateTransactions < ActiveRecord::Migration + def change + create_table :transactions do |t| + t.integer "user_id", :null => false + t.integer "bike_id" + t.integer "amount", :null => false + #Adding whether or not a user sold or purchased the bike + #could be used to help keep track of external sales. + #aka, a collective member (user) sold a bike to + #a non user + #Currently this model automatically assumes that the user is + #purchasing a bike, or a part for a bike from the collective + #t.boolean "user_sold_flag", :default => false + end + end +end