Skip to content

Commit e06b71f

Browse files
committed
Merge branch 'main' into feat/purchase-order-number-graphql-mutations
2 parents 2e6da75 + 00df093 commit e06b71f

4 files changed

Lines changed: 23 additions & 1 deletion

File tree

app/models/charge.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ def validate_accepts_target_wallet
224224
# idx_on_plan_id_billable_metric_id_pay_in_advance_4a205974cb (plan_id,billable_metric_id,pay_in_advance) WHERE (deleted_at IS NULL)
225225
# index_charges_on_accepts_target_wallet (accepts_target_wallet) WHERE (accepts_target_wallet = true)
226226
# index_charges_on_billable_metric_id (billable_metric_id) WHERE (deleted_at IS NULL)
227+
# index_charges_on_billable_metric_id_all (billable_metric_id)
227228
# index_charges_on_deleted_at (deleted_at)
228229
# index_charges_on_organization_id (organization_id)
229230
# index_charges_on_parent_id (parent_id)

app/services/wallets/threshold_top_up_service.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ def call
2222
invoice_requires_successful_payment: rule.invoice_requires_successful_payment?,
2323
metadata: rule.transaction_metadata,
2424
name: rule.transaction_name,
25-
purchase_order_number: rule.purchase_order_number,
2625
ignore_paid_top_up_limits: rule.ignore_paid_top_up_limits?
2726
}
2827

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# frozen_string_literal: true
2+
3+
class AddUnscopedIndexOnChargesBillableMetricId < ActiveRecord::Migration[8.0]
4+
disable_ddl_transaction!
5+
6+
def change
7+
add_index :charges,
8+
:billable_metric_id,
9+
name: :index_charges_on_billable_metric_id_all,
10+
algorithm: :concurrently,
11+
if_not_exists: true
12+
end
13+
end

db/structure.sql

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,7 @@ DROP INDEX IF EXISTS public.index_charges_on_plan_id;
746746
DROP INDEX IF EXISTS public.index_charges_on_parent_id;
747747
DROP INDEX IF EXISTS public.index_charges_on_organization_id;
748748
DROP INDEX IF EXISTS public.index_charges_on_deleted_at;
749+
DROP INDEX IF EXISTS public.index_charges_on_billable_metric_id_all;
749750
DROP INDEX IF EXISTS public.index_charges_on_billable_metric_id;
750751
DROP INDEX IF EXISTS public.index_charges_on_accepts_target_wallet;
751752
DROP INDEX IF EXISTS public.index_charge_filters_on_organization_id;
@@ -7462,6 +7463,13 @@ CREATE INDEX index_charges_on_accepts_target_wallet ON public.charges USING btre
74627463
CREATE INDEX index_charges_on_billable_metric_id ON public.charges USING btree (billable_metric_id) WHERE (deleted_at IS NULL);
74637464

74647465

7466+
--
7467+
-- Name: index_charges_on_billable_metric_id_all; Type: INDEX; Schema: public; Owner: -
7468+
--
7469+
7470+
CREATE INDEX index_charges_on_billable_metric_id_all ON public.charges USING btree (billable_metric_id);
7471+
7472+
74657473
--
74667474
-- Name: index_charges_on_deleted_at; Type: INDEX; Schema: public; Owner: -
74677475
--
@@ -12840,6 +12848,7 @@ SET search_path TO "$user", public;
1284012848

1284112849
INSERT INTO "schema_migrations" (version) VALUES
1284212850
('20260706131152'),
12851+
('20260703164249'),
1284312852
('20260702074504'),
1284412853
('20260701083110'),
1284512854
('20260701083109'),

0 commit comments

Comments
 (0)