Skip to content

The open-source app everyone uses to manage agents at work

598 B
Raw Blame
CREATE INDEX "cost_events_data_quality_idx" ON "cost_events" USING btree ("company_id","occurred_at" DESC NULLS LAST,"id") WHERE "cost_events"."billing_type" = 'unknown' or ("cost_events"."cost_status" = 'unpriced' and "cost_events"."billing_type" <> 'subscription_included');--> statement-breakpoint
CREATE INDEX "heartbeat_runs_cost_data_quality_idx" ON "heartbeat_runs" USING btree ("company_id",coalesce("finished_at", "created_at") desc,"id") WHERE "heartbeat_runs"."cost_accounting_pending" = true and "heartbeat_runs"."status" in ('succeeded','failed','timed_out','cancelled','interrupted');