tab/db/migrate/20150908091546_create_transactions.rb

14 lines
407 B
Ruby
Raw Normal View History

2015-09-08 11:30:11 +02:00
class CreateTransactions < ActiveRecord::Migration
def change
create_table :transactions do |t|
2015-09-08 11:44:07 +02:00
t.references :debtor, index: true, foreign_key: true, null: false
t.references :creditor, index: true, foreign_key: true, null: false
t.integer :amount, null: false, default: 0
t.string :origin, null: false
2015-09-08 11:30:11 +02:00
t.string :message
t.timestamps null: false
end
end
end