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
12 lines
301 B
Ruby
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
|