Add PaperTrail history to PaymentOrders

This commit is contained in:
Karl Erik Õunapuu 2020-02-03 16:47:04 +02:00
parent ec5ff5dc8c
commit fa1687baf0
5 changed files with 80 additions and 2 deletions

View file

@ -6,6 +6,8 @@ class CreatePaymentOrders < ActiveRecord::Migration[5.0]
t.belongs_to :invoice, foreign_key: true
t.jsonb :response, null: true
t.string :notes, null: true
t.string :creator_str
t.string :updator_str
t.timestamps
end

View file

@ -0,0 +1,16 @@
class CreatePaymentOrderVersions < ActiveRecord::Migration[5.0]
def change
create_table :log_payment_orders do |t|
t.string :item_type, null: false
t.integer :item_id, null: false
t.string :event, null: false
t.string :whodunnit
t.jsonb :object
t.jsonb :object_changes
t.datetime :created_at
t.string :session
t.jsonb :children
t.string :uuid
end
end
end