mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-21 05:09:15 +00:00
Add custom_data column to paper_trail versions table so we can track a specific list of ids in a model
Activate paper_trail in order_cycles and schedules and track each others ids An alternative way of doing this would be to use a gem for paper_trail associations but this way we avoid adding a new dependency to the app
This commit is contained in:
5
db/migrate/20191202165700_add_custom_data_to_versions.rb
Normal file
5
db/migrate/20191202165700_add_custom_data_to_versions.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddCustomDataToVersions < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :versions, :custom_data, :string
|
||||
end
|
||||
end
|
||||
@@ -1202,6 +1202,7 @@ ActiveRecord::Schema.define(:version => 20191023172424) do
|
||||
t.string "whodunnit"
|
||||
t.text "object"
|
||||
t.datetime "created_at"
|
||||
t.string "custom_data"
|
||||
end
|
||||
|
||||
add_index "versions", ["item_type", "item_id"], :name => "index_versions_on_item_type_and_item_id"
|
||||
|
||||
Reference in New Issue
Block a user