add DepositOrder model and query
This commit is contained in:
14
db/migrate/20210905234913_create_deposit_orders.rb
Normal file
14
db/migrate/20210905234913_create_deposit_orders.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
# frozen_string_literal: true
|
||||
class CreateDepositOrders < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
create_table(:deposit_orders) do |t|
|
||||
t.references(:user, null: false, foreign_key: true)
|
||||
t.string(:status, null: false)
|
||||
|
||||
t.integer(:received_amount_cents, null: false, default: 0)
|
||||
t.integer(:paid_amount_cents, null: false, default: 0)
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user