2020-10-27 16:02:41 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# Save each due dates for PaymentSchedules
|
|
|
|
class CreatePaymentScheduleItems < ActiveRecord::Migration[5.2]
|
|
|
|
def change
|
|
|
|
create_table :payment_schedule_items do |t|
|
|
|
|
t.integer :amount
|
|
|
|
t.datetime :due_date
|
2020-12-23 15:29:56 +01:00
|
|
|
t.string :state, default: 'new'
|
2020-11-12 16:44:55 +01:00
|
|
|
t.jsonb :details, default: '{}'
|
2021-01-25 14:37:07 +01:00
|
|
|
t.string :stp_invoice_id
|
2021-01-25 17:42:30 +01:00
|
|
|
t.string :payment_method
|
2021-02-08 15:28:47 +01:00
|
|
|
t.string :client_secret
|
2020-10-27 16:02:41 +01:00
|
|
|
t.belongs_to :payment_schedule, foreign_key: true
|
2020-11-10 13:43:09 +01:00
|
|
|
t.belongs_to :invoice, foreign_key: true
|
2020-12-16 18:33:43 +01:00
|
|
|
t.string :footprint
|
2020-10-27 16:02:41 +01:00
|
|
|
|
|
|
|
t.timestamps
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|