Last active
October 21, 2020 10:10
-
-
Save klondaiker/f454f60ba2489e7ea2cdd262cb46793b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CreateDrawers < ActiveRecord::Migration[5.0] | |
def change | |
create_table :ecr_drawers do |t| | |
t.references :ecr_cashier, foreign_key: true, null: false | |
t.references :open_operator, foreign_key: true, null: false | |
t.references :close_operator, foreign_key: true, null: false | |
t.string :description | |
t.string :state, null: false, default: Ecr::Drawer::OPEN_STATE | |
t.monetize :open_current_balance, currency: { default: nil } | |
t.monetize :open_actual_balance, currency: { default: nil } | |
t.monetize :close_current_balance, currency: { default: nil } | |
t.monetize :close_actual_balance, currency: { default: nil } | |
t.monetize :sale_amount, currency: { default: nil } | |
t.monetize :refund_amount, currency: { default: nil } | |
t.datetime :opened_at, null: false | |
t.datetime :closed_at | |
t.timestamps | |
end | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment