Files
ubicloud/migrate/20230831_add_dates_to_invoice.rb
Enes Cakir 11dd7342f6 Add additional data invoice to use at UI
While I was working on invoice UI, I needed extra data. I don't want to
mix data PR and UI PR. I'm adding data fields first.

- Duplicate billing info at time of invoice generation
- Add user friendly description to line items to show at invoice
- Add duration to line item to show how much used
- Convert amount and cost to float because numeric showed as scientific
  notation
- Add begin and end time to invoice for records
- Add status to invoice to determine active invoices
- Persist credit and discount amount to show on invoice
2023-08-31 14:03:15 +03:00

12 lines
301 B
Ruby

# frozen_string_literal: true
Sequel.migration do
change do
alter_table(:invoice) do
add_column :begin_time, :timestamptz, null: false
add_column :end_time, :timestamptz, null: false
add_column :status, String, collate: '"C"', null: false, default: "unpaid"
end
end
end