Merge branch 'master' of https://github.com/ZeusWPI/Tab
This commit is contained in:
commit
eab254aa4a
3 changed files with 7 additions and 4 deletions
2
Gemfile
2
Gemfile
|
@ -71,7 +71,7 @@ group :development do
|
|||
end
|
||||
|
||||
group :production do
|
||||
gem 'mysql2'
|
||||
gem 'mysql2', '~> 0.3.0'
|
||||
end
|
||||
|
||||
gem 'high_voltage', '~> 2.4.0'
|
||||
|
|
|
@ -246,7 +246,7 @@ DEPENDENCIES
|
|||
jbuilder (~> 2.0)
|
||||
jquery-datatables-rails (~> 3.3.0)
|
||||
jquery-rails
|
||||
mysql2
|
||||
mysql2 (~> 0.3.0)
|
||||
omniauth-oauth2
|
||||
purecss-rails
|
||||
rails (= 4.2.4)
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
class CreateTransactions < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :transactions do |t|
|
||||
t.references :debtor, index: true, foreign_key: true, null: false
|
||||
t.references :creditor, index: true, foreign_key: true, null: false
|
||||
t.references :debtor, index: true, null: false
|
||||
t.references :creditor, index: true, null: false
|
||||
t.integer :amount, null: false, default: 0
|
||||
t.string :origin, null: false
|
||||
t.string :message
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
|
||||
add_foreign_key :transactions, :users, column: :creditor_id
|
||||
add_foreign_key :transactions, :users, column: :debtor_id
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue