diff --git a/app/models/charge_filter.rb b/app/models/charge_filter.rb index 16f082040af4..ec76541828c9 100644 --- a/app/models/charge_filter.rb +++ b/app/models/charge_filter.rb @@ -5,7 +5,7 @@ class ChargeFilter < ApplicationRecord include Discard::Model self.discard_column = :deleted_at - belongs_to :charge, -> { with_discarded } + belongs_to :charge, -> { with_discarded }, touch: true has_many :values, class_name: 'ChargeFilterValue', dependent: :destroy has_many :billable_metric_filters, through: :values diff --git a/db/migrate/20240701083355_create_billable_metrics_grouped_charges.rb b/db/migrate/20240701083355_create_billable_metrics_grouped_charges.rb index a7db3208fcb1..5964918ae2ed 100644 --- a/db/migrate/20240701083355_create_billable_metrics_grouped_charges.rb +++ b/db/migrate/20240701083355_create_billable_metrics_grouped_charges.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true class CreateBillableMetricsGroupedCharges < ActiveRecord::Migration[7.1] + disable_ddl_transaction! + def change create_view :billable_metrics_grouped_charges end