360b438a55
* Fix: Campaign triggers first_response reporting event * fix spec failure
14 lines
583 B
Ruby
14 lines
583 B
Ruby
class AddAdditionalAttributesToMessage < ActiveRecord::Migration[6.1]
|
|
disable_ddl_transaction!
|
|
|
|
def up
|
|
add_column :messages, :additional_attributes, :jsonb, default: {}
|
|
add_index :messages, "((additional_attributes->'campaign_id'))", name: 'index_messages_on_additional_attributes_campaign_id', using: 'gin',
|
|
algorithm: :concurrently
|
|
end
|
|
|
|
def down
|
|
remove_index :messages, name: 'index_messages_on_additional_attributes_campaign_id'
|
|
remove_column :messages, :additional_attributes
|
|
end
|
|
end
|