diff --git a/db/migrate/20240816075711_add_negative_amount_cents_to_invoice.rb b/db/migrate/20240816075711_add_negative_amount_cents_to_invoice.rb new file mode 100644 index 00000000000..01759c6682d --- /dev/null +++ b/db/migrate/20240816075711_add_negative_amount_cents_to_invoice.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class AddNegativeAmountCentsToInvoice < ActiveRecord::Migration[7.1] + def change + add_column :invoices, :negative_amount_cents, :bigint, null: false, default: 0 + end +end diff --git a/db/schema.rb b/db/schema.rb index ebcd7b9af9e..2ded0643132 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -754,6 +754,7 @@ t.boolean "skip_charges", default: false, null: false t.boolean "payment_overdue", default: false t.uuid "payable_group_id" + t.bigint "negative_amount_cents", default: 0, null: false t.index ["customer_id", "sequential_id"], name: "index_invoices_on_customer_id_and_sequential_id", unique: true t.index ["customer_id"], name: "index_invoices_on_customer_id" t.index ["number"], name: "index_invoices_on_number"