37 lines
1.2 KiB
Ruby
37 lines
1.2 KiB
Ruby
# This file is autogenerated. Instead of editing this file, please use the
|
|
# migrations feature of ActiveRecord to incrementally modify your database, and
|
|
# then regenerate this schema definition.
|
|
|
|
ActiveRecord::Schema.define(:version => 6) do
|
|
|
|
create_table "baristas", :force => true do |t|
|
|
t.column "name", :string, :limit => 64, :null => false
|
|
t.column "milk_last_bought_at", :datetime
|
|
t.column "fund_id", :integer
|
|
t.column "created_on", :date
|
|
end
|
|
|
|
add_index "baristas", ["fund_id"], :name => "baristas_fund_id_index"
|
|
|
|
create_table "funds", :force => true do |t|
|
|
t.column "name", :string, :limit => 64
|
|
t.column "created_at", :datetime
|
|
t.column "balance", :float
|
|
t.column "contribution", :float
|
|
end
|
|
|
|
create_table "ledgers", :force => true do |t|
|
|
t.column "barista_id", :integer, :null => false
|
|
t.column "created_at", :datetime
|
|
t.column "credit_amount", :float
|
|
t.column "debit_amount", :float
|
|
t.column "comment", :string, :limit => 64
|
|
t.column "fund_id", :integer
|
|
t.column "post_date", :date
|
|
end
|
|
|
|
add_index "ledgers", ["barista_id"], :name => "ledgers_barista_id_index"
|
|
add_index "ledgers", ["fund_id"], :name => "ledgers_fund_id_index"
|
|
|
|
end
|