COLUMN bss.coord_leases attempts integer NOT NULL DEFAULT 0
COLUMN bss.coord_leases key text NOT NULL DEFAULT -
COLUMN bss.coord_leases locked_by uuid NULL DEFAULT -
COLUMN bss.coord_leases locked_until timestamp with time zone NOT NULL DEFAULT '1970-01-01 00:00:00+00'::timestamp with time zone
COLUMN bss.pricing_acceptance accepted_at text NOT NULL DEFAULT -
COLUMN bss.pricing_acceptance created_by uuid NOT NULL DEFAULT -
COLUMN bss.pricing_acceptance hold_until text NOT NULL DEFAULT -
COLUMN bss.pricing_acceptance id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_acceptance line_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_acceptance order_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_acceptance order_version text NOT NULL DEFAULT -
COLUMN bss.pricing_acceptance receipt_json text NOT NULL DEFAULT -
COLUMN bss.pricing_acceptance request_digest text NOT NULL DEFAULT -
COLUMN bss.pricing_acceptance tenant_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_acceptance terms_digest text NOT NULL DEFAULT -
COLUMN bss.pricing_approval_decision actor uuid NOT NULL DEFAULT -
COLUMN bss.pricing_approval_decision at timestamp with time zone NOT NULL DEFAULT -
COLUMN bss.pricing_approval_decision decision text NOT NULL DEFAULT -
COLUMN bss.pricing_approval_decision generation integer NOT NULL DEFAULT -
COLUMN bss.pricing_approval_decision note text NULL DEFAULT -
COLUMN bss.pricing_approval_decision stale boolean NOT NULL DEFAULT false
COLUMN bss.pricing_approval_decision tenant_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_approval_decision unit_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_approval_policy kind text NOT NULL DEFAULT -
COLUMN bss.pricing_approval_policy quorum integer NOT NULL DEFAULT -
COLUMN bss.pricing_approval_policy tenant_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_approval_unit common_effective_date date NULL DEFAULT -
COLUMN bss.pricing_approval_unit decided_at timestamp with time zone NULL DEFAULT -
COLUMN bss.pricing_approval_unit decided_note text NULL DEFAULT -
COLUMN bss.pricing_approval_unit generation integer NOT NULL DEFAULT 1
COLUMN bss.pricing_approval_unit id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_approval_unit kind text NOT NULL DEFAULT -
COLUMN bss.pricing_approval_unit quorum_required integer NOT NULL DEFAULT -
COLUMN bss.pricing_approval_unit ref_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_approval_unit ref_type text NOT NULL DEFAULT -
COLUMN bss.pricing_approval_unit snapshot jsonb NOT NULL DEFAULT -
COLUMN bss.pricing_approval_unit snapshot_hash text NOT NULL DEFAULT -
COLUMN bss.pricing_approval_unit state text NOT NULL DEFAULT -
COLUMN bss.pricing_approval_unit submit_note text NULL DEFAULT -
COLUMN bss.pricing_approval_unit submitted_at timestamp with time zone NOT NULL DEFAULT -
COLUMN bss.pricing_approval_unit submitted_by uuid NOT NULL DEFAULT -
COLUMN bss.pricing_approval_unit tenant_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_approval_unit version bigint NOT NULL DEFAULT 1
COLUMN bss.pricing_approval_unit_item after_json jsonb NOT NULL DEFAULT -
COLUMN bss.pricing_approval_unit_item before_json jsonb NULL DEFAULT -
COLUMN bss.pricing_approval_unit_item created_by uuid NOT NULL DEFAULT -
COLUMN bss.pricing_approval_unit_item item_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_approval_unit_item item_type text NOT NULL DEFAULT -
COLUMN bss.pricing_approval_unit_item tenant_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_approval_unit_item unit_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_audit action text NOT NULL DEFAULT -
COLUMN bss.pricing_audit actor_ref uuid NOT NULL DEFAULT -
COLUMN bss.pricing_audit attempted_key text NULL DEFAULT -
COLUMN bss.pricing_audit audit_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_audit ceremony_ref uuid NULL DEFAULT -
COLUMN bss.pricing_audit chain_id uuid NULL DEFAULT -
COLUMN bss.pricing_audit correlation_id text NULL DEFAULT -
COLUMN bss.pricing_audit error_code text NULL DEFAULT -
COLUMN bss.pricing_audit prev_hash bytea NULL DEFAULT -
COLUMN bss.pricing_audit reason text NULL DEFAULT -
COLUMN bss.pricing_audit row_hash bytea NULL DEFAULT -
COLUMN bss.pricing_audit seal_state text NOT NULL DEFAULT -
COLUMN bss.pricing_audit seq bigint NULL DEFAULT -
COLUMN bss.pricing_audit session_id uuid NULL DEFAULT -
COLUMN bss.pricing_audit subject_id uuid NULL DEFAULT -
COLUMN bss.pricing_audit subject_kind text NOT NULL DEFAULT -
COLUMN bss.pricing_audit subject_revision bigint NULL DEFAULT -
COLUMN bss.pricing_audit tenant_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_audit written_at timestamp with time zone NOT NULL DEFAULT -
COLUMN bss.pricing_commercial_command acceptance_id uuid NULL DEFAULT -
COLUMN bss.pricing_commercial_command caller_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_commercial_command caller_tenant_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_commercial_command hold_id uuid NULL DEFAULT -
COLUMN bss.pricing_commercial_command id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_commercial_command idempotency_key text NOT NULL DEFAULT -
COLUMN bss.pricing_commercial_command operation text NOT NULL DEFAULT -
COLUMN bss.pricing_commercial_command receipt_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_commercial_command receipt_kind text NOT NULL DEFAULT -
COLUMN bss.pricing_commercial_command request_digest text NOT NULL DEFAULT -
COLUMN bss.pricing_commercial_command tenant_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_dimension_key key text NOT NULL DEFAULT -
COLUMN bss.pricing_dimension_key tenant_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_dimension_key values jsonb NOT NULL DEFAULT -
COLUMN bss.pricing_dimension_key version bigint NOT NULL DEFAULT 1
COLUMN bss.pricing_hold acceptance_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_hold activation_at text NOT NULL DEFAULT -
COLUMN bss.pricing_hold created_at text NOT NULL DEFAULT -
COLUMN bss.pricing_hold created_by uuid NOT NULL DEFAULT -
COLUMN bss.pricing_hold id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_hold receipt_json text NOT NULL DEFAULT -
COLUMN bss.pricing_hold tenant_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_hold terms_digest text NOT NULL DEFAULT -
COLUMN bss.pricing_idempotency client_key text NOT NULL DEFAULT -
COLUMN bss.pricing_idempotency endpoint text NOT NULL DEFAULT -
COLUMN bss.pricing_idempotency entity_ref uuid NULL DEFAULT -
COLUMN bss.pricing_idempotency expires_at timestamp with time zone NOT NULL DEFAULT -
COLUMN bss.pricing_idempotency payload_hash bytea NOT NULL DEFAULT -
COLUMN bss.pricing_idempotency response_body jsonb NULL DEFAULT -
COLUMN bss.pricing_idempotency response_status integer NULL DEFAULT -
COLUMN bss.pricing_idempotency state text NOT NULL DEFAULT -
COLUMN bss.pricing_idempotency tenant_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_plan code text NOT NULL DEFAULT -
COLUMN bss.pricing_plan created_at timestamp with time zone NOT NULL DEFAULT -
COLUMN bss.pricing_plan created_by uuid NOT NULL DEFAULT -
COLUMN bss.pricing_plan current_book_id uuid NULL DEFAULT -
COLUMN bss.pricing_plan current_currency text NULL DEFAULT -
COLUMN bss.pricing_plan id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_plan last_activity_at timestamp with time zone NOT NULL DEFAULT '1970-01-01 00:00:00+00'::timestamp with time zone
COLUMN bss.pricing_plan name text NOT NULL DEFAULT -
COLUMN bss.pricing_plan published_rev integer NULL DEFAULT -
COLUMN bss.pricing_plan published_revision_id uuid NULL DEFAULT -
COLUMN bss.pricing_plan scheduled_from date NULL DEFAULT -
COLUMN bss.pricing_plan scheduled_revision_id uuid NULL DEFAULT -
COLUMN bss.pricing_plan tenant_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_plan updated_at timestamp with time zone NOT NULL DEFAULT -
COLUMN bss.pricing_plan version bigint NOT NULL DEFAULT 1
COLUMN bss.pricing_plan work_revision_id uuid NULL DEFAULT -
COLUMN bss.pricing_plan work_state text NULL DEFAULT -
COLUMN bss.pricing_plan_item created_at timestamp with time zone NOT NULL DEFAULT -
COLUMN bss.pricing_plan_item created_by uuid NOT NULL DEFAULT -
COLUMN bss.pricing_plan_item id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_plan_item included_qty text NULL DEFAULT -
COLUMN bss.pricing_plan_item price_book_entry_id uuid NULL DEFAULT -
COLUMN bss.pricing_plan_item qty_min integer NULL DEFAULT -
COLUMN bss.pricing_plan_item reference_state text NOT NULL DEFAULT -
COLUMN bss.pricing_plan_item reservation_id uuid NULL DEFAULT -
COLUMN bss.pricing_plan_item revision_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_plan_item sku_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_plan_item tenant_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_plan_item treatment text NOT NULL DEFAULT -
COLUMN bss.pricing_plan_item updated_at timestamp with time zone NOT NULL DEFAULT -
COLUMN bss.pricing_plan_item version bigint NOT NULL DEFAULT 1
COLUMN bss.pricing_plan_revision approved_by_unit_id uuid NULL DEFAULT -
COLUMN bss.pricing_plan_revision available_from date NULL DEFAULT -
COLUMN bss.pricing_plan_revision book_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_plan_revision created_at timestamp with time zone NOT NULL DEFAULT -
COLUMN bss.pricing_plan_revision created_by uuid NOT NULL DEFAULT -
COLUMN bss.pricing_plan_revision id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_plan_revision pending_unit_id uuid NULL DEFAULT -
COLUMN bss.pricing_plan_revision plan_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_plan_revision published_at timestamp with time zone NULL DEFAULT -
COLUMN bss.pricing_plan_revision rev_no integer NOT NULL DEFAULT -
COLUMN bss.pricing_plan_revision state text NOT NULL DEFAULT -
COLUMN bss.pricing_plan_revision tenant_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_plan_revision updated_at timestamp with time zone NOT NULL DEFAULT -
COLUMN bss.pricing_plan_revision version bigint NOT NULL DEFAULT 1
COLUMN bss.pricing_price approved_at timestamp with time zone NULL DEFAULT -
COLUMN bss.pricing_price approved_by_unit_id uuid NULL DEFAULT -
COLUMN bss.pricing_price cancelled_by_unit_id uuid NULL DEFAULT -
COLUMN bss.pricing_price change_kind text NOT NULL DEFAULT 'set'::text
COLUMN bss.pricing_price closed_explicitly boolean NOT NULL DEFAULT false
COLUMN bss.pricing_price created_at timestamp with time zone NOT NULL DEFAULT -
COLUMN bss.pricing_price created_by uuid NOT NULL DEFAULT -
COLUMN bss.pricing_price currency text NOT NULL DEFAULT -
COLUMN bss.pricing_price currency_scale smallint NOT NULL DEFAULT -
COLUMN bss.pricing_price dim_value text NULL DEFAULT -
COLUMN bss.pricing_price effective_from date NOT NULL DEFAULT -
COLUMN bss.pricing_price effective_to date NULL DEFAULT -
COLUMN bss.pricing_price eligibility text NOT NULL DEFAULT -
COLUMN bss.pricing_price id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_price keep_for_bound boolean NOT NULL DEFAULT false
COLUMN bss.pricing_price min_fee text NULL DEFAULT -
COLUMN bss.pricing_price note text NULL DEFAULT -
COLUMN bss.pricing_price paired_price_id uuid NULL DEFAULT -
COLUMN bss.pricing_price pending_unit_id uuid NULL DEFAULT -
COLUMN bss.pricing_price price_book_entry_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_price price_json jsonb NOT NULL DEFAULT -
COLUMN bss.pricing_price return_of_price_id uuid NULL DEFAULT -
COLUMN bss.pricing_price state text NOT NULL DEFAULT -
COLUMN bss.pricing_price target_price_id uuid NULL DEFAULT -
COLUMN bss.pricing_price temporary_until date NULL DEFAULT -
COLUMN bss.pricing_price tenant_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_price updated_at timestamp with time zone NOT NULL DEFAULT -
COLUMN bss.pricing_price version bigint NOT NULL DEFAULT 1
COLUMN bss.pricing_price version_no integer NOT NULL DEFAULT -
COLUMN bss.pricing_price_book archived_at timestamp with time zone NULL DEFAULT -
COLUMN bss.pricing_price_book archived_by uuid NULL DEFAULT -
COLUMN bss.pricing_price_book code text NOT NULL DEFAULT -
COLUMN bss.pricing_price_book created_at timestamp with time zone NOT NULL DEFAULT -
COLUMN bss.pricing_price_book currency character(3) NOT NULL DEFAULT -
COLUMN bss.pricing_price_book description text NULL DEFAULT -
COLUMN bss.pricing_price_book id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_price_book name text NOT NULL DEFAULT -
COLUMN bss.pricing_price_book tenant_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_price_book updated_at timestamp with time zone NOT NULL DEFAULT -
COLUMN bss.pricing_price_book valid_from date NULL DEFAULT -
COLUMN bss.pricing_price_book valid_until date NULL DEFAULT -
COLUMN bss.pricing_price_book version bigint NOT NULL DEFAULT 1
COLUMN bss.pricing_price_book_entry book_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_price_book_entry charge_kind text NOT NULL DEFAULT -
COLUMN bss.pricing_price_book_entry created_at timestamp with time zone NOT NULL DEFAULT -
COLUMN bss.pricing_price_book_entry dimension_key text NULL DEFAULT -
COLUMN bss.pricing_price_book_entry id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_price_book_entry invoice_line_override text NULL DEFAULT -
COLUMN bss.pricing_price_book_entry model text NOT NULL DEFAULT -
COLUMN bss.pricing_price_book_entry period text NULL DEFAULT -
COLUMN bss.pricing_price_book_entry reference_state text NOT NULL DEFAULT -
COLUMN bss.pricing_price_book_entry reservation_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_price_book_entry sku_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_price_book_entry tenant_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_price_book_entry updated_at timestamp with time zone NOT NULL DEFAULT -
COLUMN bss.pricing_price_book_entry usage_policy_digest text NULL DEFAULT -
COLUMN bss.pricing_price_book_entry usage_policy_id uuid NULL DEFAULT -
COLUMN bss.pricing_price_book_entry usage_policy_version bigint NULL DEFAULT -
COLUMN bss.pricing_price_book_entry usage_sku_version bigint NULL DEFAULT -
COLUMN bss.pricing_price_book_entry version bigint NOT NULL DEFAULT 1
COLUMN bss.pricing_reference_op attempts integer NOT NULL DEFAULT 0
COLUMN bss.pricing_reference_op created_at timestamp with time zone NOT NULL DEFAULT -
COLUMN bss.pricing_reference_op created_by uuid NOT NULL DEFAULT -
COLUMN bss.pricing_reference_op idempotency_key text NULL DEFAULT -
COLUMN bss.pricing_reference_op kind text NOT NULL DEFAULT -
COLUMN bss.pricing_reference_op last_error text NULL DEFAULT -
COLUMN bss.pricing_reference_op next_attempt_at timestamp with time zone NOT NULL DEFAULT -
COLUMN bss.pricing_reference_op op_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_reference_op outcome text NULL DEFAULT -
COLUMN bss.pricing_reference_op ref_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_reference_op ref_kind text NOT NULL DEFAULT -
COLUMN bss.pricing_reference_op reservation_id uuid NULL DEFAULT -
COLUMN bss.pricing_reference_op sku_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_reference_op state text NOT NULL DEFAULT -
COLUMN bss.pricing_reference_op tenant_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_reference_op updated_at timestamp with time zone NOT NULL DEFAULT -
COLUMN bss.pricing_settings created_at timestamp with time zone NOT NULL DEFAULT -
COLUMN bss.pricing_settings currencies jsonb NOT NULL DEFAULT '[]'::jsonb
COLUMN bss.pricing_settings default_gl text NULL DEFAULT -
COLUMN bss.pricing_settings default_tax_category text NULL DEFAULT -
COLUMN bss.pricing_settings default_timing text NOT NULL DEFAULT -
COLUMN bss.pricing_settings invoice_line_templates jsonb NOT NULL DEFAULT -
COLUMN bss.pricing_settings tenant_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_settings updated_at timestamp with time zone NOT NULL DEFAULT -
COLUMN bss.pricing_settings updated_by uuid NULL DEFAULT -
COLUMN bss.pricing_settings version bigint NOT NULL DEFAULT 1
COLUMN bss.pricing_usage_rating_policy content jsonb NOT NULL DEFAULT -
COLUMN bss.pricing_usage_rating_policy created_at timestamp with time zone NOT NULL DEFAULT -
COLUMN bss.pricing_usage_rating_policy created_by uuid NOT NULL DEFAULT -
COLUMN bss.pricing_usage_rating_policy digest text NOT NULL DEFAULT -
COLUMN bss.pricing_usage_rating_policy policy_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_usage_rating_policy tenant_id uuid NOT NULL DEFAULT -
COLUMN bss.pricing_usage_rating_policy version bigint NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_body created_at timestamp with time zone NOT NULL DEFAULT now()
COLUMN public.bss_pricing_outbox_body id bigint NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_body payload bytea NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_body payload_type character varying(1024) NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_body trace character varying(256) NULL DEFAULT -
COLUMN public.bss_pricing_outbox_dead_letters attempts smallint NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_dead_letters completed_at timestamp with time zone NULL DEFAULT -
COLUMN public.bss_pricing_outbox_dead_letters created_at timestamp with time zone NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_dead_letters deadline timestamp with time zone NULL DEFAULT -
COLUMN public.bss_pricing_outbox_dead_letters failed_at timestamp with time zone NOT NULL DEFAULT now()
COLUMN public.bss_pricing_outbox_dead_letters id bigint NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_dead_letters last_error text NULL DEFAULT -
COLUMN public.bss_pricing_outbox_dead_letters partition_id bigint NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_dead_letters payload bytea NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_dead_letters payload_type character varying(1024) NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_dead_letters seq bigint NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_dead_letters status character varying(32) NOT NULL DEFAULT 'pending'::character varying
COLUMN public.bss_pricing_outbox_dead_letters trace character varying(256) NULL DEFAULT -
COLUMN public.bss_pricing_outbox_incoming body_id bigint NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_incoming id bigint NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_incoming partition_id bigint NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_outgoing body_id bigint NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_outgoing id bigint NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_outgoing partition_id bigint NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_outgoing seq bigint NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_outgoing sequenced_at timestamp with time zone NOT NULL DEFAULT now()
COLUMN public.bss_pricing_outbox_partitions id bigint NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_partitions partition smallint NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_partitions queue character varying(1024) NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_partitions sequence bigint NOT NULL DEFAULT 0
COLUMN public.bss_pricing_outbox_processor attempts smallint NOT NULL DEFAULT 0
COLUMN public.bss_pricing_outbox_processor last_error text NULL DEFAULT -
COLUMN public.bss_pricing_outbox_processor locked_by character varying(1024) NULL DEFAULT -
COLUMN public.bss_pricing_outbox_processor locked_until timestamp with time zone NULL DEFAULT -
COLUMN public.bss_pricing_outbox_processor partition_id bigint NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_processor processed_seq bigint NOT NULL DEFAULT 0
COLUMN public.bss_pricing_outbox_trace attempts bigint NOT NULL DEFAULT 0
COLUMN public.bss_pricing_outbox_trace completed_at timestamp with time zone NULL DEFAULT -
COLUMN public.bss_pricing_outbox_trace created_at timestamp with time zone NOT NULL DEFAULT now()
COLUMN public.bss_pricing_outbox_trace entities bigint NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_trace failures bigint NOT NULL DEFAULT 0
COLUMN public.bss_pricing_outbox_trace id bigint NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_trace last_error text NULL DEFAULT -
COLUMN public.bss_pricing_outbox_trace notified_at timestamp with time zone NULL DEFAULT -
COLUMN public.bss_pricing_outbox_trace owner_instance character varying(256) NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_trace pending bigint NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_trace queue character varying(1024) NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_trace retrying_since timestamp with time zone NULL DEFAULT -
COLUMN public.bss_pricing_outbox_trace trace character varying(256) NOT NULL DEFAULT -
COLUMN public.bss_pricing_outbox_vacuum_counter counter bigint NOT NULL DEFAULT 0
COLUMN public.bss_pricing_outbox_vacuum_counter partition_id bigint NOT NULL DEFAULT -
COLUMN public.event_broker_producer_registrations client_agent character varying(256) NOT NULL DEFAULT -
COLUMN public.event_broker_producer_registrations created_at timestamp with time zone NOT NULL DEFAULT now()
COLUMN public.event_broker_producer_registrations generation bigint NOT NULL DEFAULT -
COLUMN public.event_broker_producer_registrations mode character varying(32) NOT NULL DEFAULT -
COLUMN public.event_broker_producer_registrations producer_id uuid NOT NULL DEFAULT -
COLUMN public.event_broker_producer_registrations registration_key character varying(1024) NOT NULL DEFAULT -
COLUMN public.event_broker_producer_registrations updated_at timestamp with time zone NOT NULL DEFAULT now()
CONSTRAINT bss.coord_leases coord_leases_pkey PRIMARY KEY (key)
CONSTRAINT bss.pricing_acceptance pricing_acceptance_pkey PRIMARY KEY (tenant_id, id)
CONSTRAINT bss.pricing_acceptance pricing_acceptance_request_digest_check CHECK ((request_digest ~ '^[0-9a-f]{64}$'::text))
CONSTRAINT bss.pricing_acceptance pricing_acceptance_terms_digest_check CHECK ((terms_digest ~ '^[0-9a-f]{64}$'::text))
CONSTRAINT bss.pricing_acceptance pricing_acceptance_version CHECK ((((length(order_version) >= 1) AND (length(order_version) <= 20)) AND (substr(order_version, 1, 1) <> '0'::text) AND ((length(order_version) < 20) OR (order_version <= '18446744073709551615'::text)) AND (order_version ~ '^[0-9]+$'::text)))
CONSTRAINT bss.pricing_acceptance pricing_acceptance_window CHECK ((hold_until > accepted_at))
CONSTRAINT bss.pricing_approval_decision pricing_approval_decision_decision_check CHECK ((decision = ANY (ARRAY['approve'::text, 'reject'::text])))
CONSTRAINT bss.pricing_approval_decision pricing_approval_decision_pkey PRIMARY KEY (unit_id, actor, generation)
CONSTRAINT bss.pricing_approval_decision pricing_approval_decision_unit_id_fkey FOREIGN KEY (unit_id) REFERENCES bss.pricing_approval_unit(id)
CONSTRAINT bss.pricing_approval_policy pricing_approval_policy_pkey PRIMARY KEY (tenant_id, kind)
CONSTRAINT bss.pricing_approval_policy pricing_approval_policy_quorum_check CHECK ((quorum >= 0))
CONSTRAINT bss.pricing_approval_unit pricing_approval_unit_pkey PRIMARY KEY (id)
CONSTRAINT bss.pricing_approval_unit pricing_approval_unit_state_check CHECK ((state = ANY (ARRAY['pending'::text, 'approved'::text, 'rejected'::text, 'withdrawn'::text])))
CONSTRAINT bss.pricing_approval_unit_item pricing_approval_unit_item_pkey PRIMARY KEY (unit_id, item_type, item_id)
CONSTRAINT bss.pricing_approval_unit_item pricing_approval_unit_item_unit_id_fkey FOREIGN KEY (unit_id) REFERENCES bss.pricing_approval_unit(id)
CONSTRAINT bss.pricing_audit chk_pricing_audit_seal_group CHECK ((((seal_state = 'unsealed'::text) AND (chain_id IS NULL) AND (seq IS NULL) AND (prev_hash IS NULL) AND (row_hash IS NULL)) OR ((seal_state = 'sealed'::text) AND (chain_id IS NOT NULL) AND (seq IS NOT NULL) AND (row_hash IS NOT NULL))))
CONSTRAINT bss.pricing_audit chk_pricing_audit_seal_state CHECK ((seal_state = ANY (ARRAY['unsealed'::text, 'sealed'::text])))
CONSTRAINT bss.pricing_audit chk_pricing_audit_seq CHECK (((seq IS NULL) OR (seq >= 0)))
CONSTRAINT bss.pricing_audit chk_pricing_audit_subject_ref CHECK (((subject_id IS NOT NULL) OR (attempted_key IS NOT NULL) OR (session_id IS NOT NULL)))
CONSTRAINT bss.pricing_audit pricing_audit_pkey PRIMARY KEY (audit_id)
CONSTRAINT bss.pricing_commercial_command pricing_commercial_command_acceptance_fk FOREIGN KEY (tenant_id, acceptance_id) REFERENCES bss.pricing_acceptance(tenant_id, id)
CONSTRAINT bss.pricing_commercial_command pricing_commercial_command_hold_fk FOREIGN KEY (tenant_id, hold_id) REFERENCES bss.pricing_hold(tenant_id, id)
CONSTRAINT bss.pricing_commercial_command pricing_commercial_command_key CHECK ((length(idempotency_key) > 0))
CONSTRAINT bss.pricing_commercial_command pricing_commercial_command_pkey PRIMARY KEY (tenant_id, id)
CONSTRAINT bss.pricing_commercial_command pricing_commercial_command_request_digest_check CHECK ((request_digest ~ '^[0-9a-f]{64}$'::text))
CONSTRAINT bss.pricing_commercial_command pricing_commercial_command_target CHECK ((((operation = 'check'::text) AND (receipt_kind = 'acceptance'::text) AND (acceptance_id IS NOT NULL) AND (receipt_id = acceptance_id) AND (hold_id IS NULL)) OR ((operation = 'hold'::text) AND (receipt_kind = 'hold'::text) AND (hold_id IS NOT NULL) AND (receipt_id = hold_id) AND (acceptance_id IS NULL))))
CONSTRAINT bss.pricing_dimension_key pricing_dimension_key_pkey PRIMARY KEY (tenant_id, key)
CONSTRAINT bss.pricing_hold pricing_hold_acceptance_fk FOREIGN KEY (tenant_id, acceptance_id) REFERENCES bss.pricing_acceptance(tenant_id, id)
CONSTRAINT bss.pricing_hold pricing_hold_pkey PRIMARY KEY (tenant_id, id)
CONSTRAINT bss.pricing_hold pricing_hold_terms_digest_check CHECK ((terms_digest ~ '^[0-9a-f]{64}$'::text))
CONSTRAINT bss.pricing_idempotency chk_pricing_idempotency_response_group CHECK ((((state = 'claimed'::text) AND (response_status IS NULL) AND (response_body IS NULL)) OR ((state = 'answered'::text) AND (response_status IS NOT NULL) AND (response_body IS NOT NULL))))
CONSTRAINT bss.pricing_idempotency chk_pricing_idempotency_state CHECK ((state = ANY (ARRAY['claimed'::text, 'answered'::text])))
CONSTRAINT bss.pricing_idempotency pricing_idempotency_pkey PRIMARY KEY (tenant_id, endpoint, client_key)
CONSTRAINT bss.pricing_plan pricing_plan_pkey PRIMARY KEY (id)
CONSTRAINT bss.pricing_plan pricing_plan_scheduled_pair CHECK (((scheduled_revision_id IS NULL) = (scheduled_from IS NULL)))
CONSTRAINT bss.pricing_plan pricing_plan_work_pair CHECK (((work_revision_id IS NULL) = (work_state IS NULL)))
CONSTRAINT bss.pricing_plan pricing_plan_work_state CHECK (((work_state IS NULL) OR (work_state = ANY (ARRAY['draft'::text, 'pending'::text]))))
CONSTRAINT bss.pricing_plan_item chk_pricing_plan_item_entry CHECK (((treatment = 'included'::text) OR (price_book_entry_id IS NOT NULL)))
CONSTRAINT bss.pricing_plan_item chk_pricing_plan_item_included_qty CHECK ((included_qty ~ '^[0-9]+(\.[0-9]+)?$'::text))
CONSTRAINT bss.pricing_plan_item chk_pricing_plan_item_qty_min CHECK ((qty_min >= 0))
CONSTRAINT bss.pricing_plan_item chk_pricing_plan_item_reference_state CHECK ((reference_state = ANY (ARRAY['unreserved'::text, 'confirmation_pending'::text, 'confirmed'::text, 'lost'::text])))
CONSTRAINT bss.pricing_plan_item chk_pricing_plan_item_treatment CHECK ((treatment = ANY (ARRAY['paid'::text, 'optional'::text, 'included'::text])))
CONSTRAINT bss.pricing_plan_item pricing_plan_item_pkey PRIMARY KEY (id)
CONSTRAINT bss.pricing_plan_item pricing_plan_item_price_book_entry_id_fkey FOREIGN KEY (price_book_entry_id) REFERENCES bss.pricing_price_book_entry(id)
CONSTRAINT bss.pricing_plan_item pricing_plan_item_revision_id_fkey FOREIGN KEY (revision_id) REFERENCES bss.pricing_plan_revision(id)
CONSTRAINT bss.pricing_plan_item pricing_plan_item_sku UNIQUE (revision_id, sku_id)
CONSTRAINT bss.pricing_plan_revision chk_pricing_plan_revision_state CHECK ((state = ANY (ARRAY['draft'::text, 'pending'::text, 'scheduled'::text, 'published'::text, 'superseded'::text])))
CONSTRAINT bss.pricing_plan_revision pricing_plan_revision_approved_by_unit_id_fkey FOREIGN KEY (approved_by_unit_id) REFERENCES bss.pricing_approval_unit(id)
CONSTRAINT bss.pricing_plan_revision pricing_plan_revision_book_id_fkey FOREIGN KEY (book_id) REFERENCES bss.pricing_price_book(id)
CONSTRAINT bss.pricing_plan_revision pricing_plan_revision_no UNIQUE (plan_id, rev_no)
CONSTRAINT bss.pricing_plan_revision pricing_plan_revision_pending_unit_id_fkey FOREIGN KEY (pending_unit_id) REFERENCES bss.pricing_approval_unit(id)
CONSTRAINT bss.pricing_plan_revision pricing_plan_revision_pkey PRIMARY KEY (id)
CONSTRAINT bss.pricing_plan_revision pricing_plan_revision_plan_id_fkey FOREIGN KEY (plan_id) REFERENCES bss.pricing_plan(id)
CONSTRAINT bss.pricing_price pricing_price_approved_by_unit_id_fkey FOREIGN KEY (approved_by_unit_id) REFERENCES bss.pricing_approval_unit(id)
CONSTRAINT bss.pricing_price pricing_price_cancelled_by_unit_id_fkey FOREIGN KEY (cancelled_by_unit_id) REFERENCES bss.pricing_approval_unit(id)
CONSTRAINT bss.pricing_price pricing_price_cancelled_unit_check CHECK (((state = 'cancelled'::text) = (cancelled_by_unit_id IS NOT NULL)))
CONSTRAINT bss.pricing_price pricing_price_change_kind_check CHECK ((change_kind = ANY (ARRAY['set'::text, 'cancel'::text, 'end'::text])))
CONSTRAINT bss.pricing_price pricing_price_change_target_check CHECK (((change_kind = 'set'::text) = (target_price_id IS NULL)))
CONSTRAINT bss.pricing_price pricing_price_check CHECK (((effective_to IS NULL) OR (effective_from < effective_to)))
CONSTRAINT bss.pricing_price pricing_price_currency_check CHECK ((currency ~ '^[A-Z]{3}$'::text))
CONSTRAINT bss.pricing_price pricing_price_currency_scale_check CHECK (((currency_scale >= 0) AND (currency_scale <= 28)))
CONSTRAINT bss.pricing_price pricing_price_dim_value_check CHECK (((dim_value IS NULL) OR (dim_value <> ''::text)))
CONSTRAINT bss.pricing_price pricing_price_eligibility_check CHECK ((eligibility = ANY (ARRAY['all'::text, 'new'::text])))
CONSTRAINT bss.pricing_price pricing_price_min_fee_check CHECK ((min_fee ~ '^(0|[1-9][0-9]*)(\.[0-9]*[1-9])?$'::text))
CONSTRAINT bss.pricing_price pricing_price_paired_price_id_fkey FOREIGN KEY (paired_price_id) REFERENCES bss.pricing_price(id)
CONSTRAINT bss.pricing_price pricing_price_pending_unit_id_fkey FOREIGN KEY (pending_unit_id) REFERENCES bss.pricing_approval_unit(id)
CONSTRAINT bss.pricing_price pricing_price_pkey PRIMARY KEY (id)
CONSTRAINT bss.pricing_price pricing_price_price_book_entry_id_fkey FOREIGN KEY (price_book_entry_id) REFERENCES bss.pricing_price_book_entry(id)
CONSTRAINT bss.pricing_price pricing_price_price_book_entry_id_version_no_key UNIQUE (price_book_entry_id, version_no)
CONSTRAINT bss.pricing_price pricing_price_return_of_price_id_fkey FOREIGN KEY (return_of_price_id) REFERENCES bss.pricing_price(id)
CONSTRAINT bss.pricing_price pricing_price_state_check CHECK ((state = ANY (ARRAY['draft'::text, 'pending'::text, 'approved'::text, 'rejected'::text, 'cancelled'::text])))
CONSTRAINT bss.pricing_price pricing_price_target_price_id_fkey FOREIGN KEY (target_price_id) REFERENCES bss.pricing_price(id)
CONSTRAINT bss.pricing_price_book pricing_price_book_archive_mark_check CHECK (((archived_at IS NULL) = (archived_by IS NULL)))
CONSTRAINT bss.pricing_price_book pricing_price_book_check CHECK (((valid_from IS NULL) OR (valid_until IS NULL) OR (valid_from < valid_until)))
CONSTRAINT bss.pricing_price_book pricing_price_book_pkey PRIMARY KEY (id)
CONSTRAINT bss.pricing_price_book pricing_price_book_tenant_id_code_key UNIQUE (tenant_id, code)
CONSTRAINT bss.pricing_price_book pricing_price_book_tenant_id_id_key UNIQUE (tenant_id, id)
CONSTRAINT bss.pricing_price_book_entry pricing_entry_policy_complete CHECK ((((usage_policy_id IS NULL) AND (usage_policy_version IS NULL) AND (usage_policy_digest IS NULL)) OR ((usage_policy_id IS NOT NULL) AND (usage_policy_version IS NOT NULL) AND (usage_policy_digest IS NOT NULL) AND (charge_kind = 'usage'::text))))
CONSTRAINT bss.pricing_price_book_entry pricing_entry_policy_fk FOREIGN KEY (tenant_id, usage_policy_id, usage_policy_version, usage_policy_digest) REFERENCES bss.pricing_usage_rating_policy(tenant_id, policy_id, version, digest)
CONSTRAINT bss.pricing_price_book_entry pricing_entry_sku_version CHECK (((usage_sku_version IS NULL) OR ((usage_policy_id IS NOT NULL) AND (usage_sku_version >= 1))))
CONSTRAINT bss.pricing_price_book_entry pricing_price_book_entry_book_id_fkey FOREIGN KEY (book_id) REFERENCES bss.pricing_price_book(id)
CONSTRAINT bss.pricing_price_book_entry pricing_price_book_entry_charge_kind_check CHECK ((charge_kind = ANY (ARRAY['recurring'::text, 'usage'::text, 'one_time'::text])))
CONSTRAINT bss.pricing_price_book_entry pricing_price_book_entry_check CHECK ((((charge_kind = 'recurring'::text) AND (period IS NOT NULL) AND (period = ANY (ARRAY['month'::text, 'year'::text]))) OR ((charge_kind = ANY (ARRAY['usage'::text, 'one_time'::text])) AND (period IS NULL))))
CONSTRAINT bss.pricing_price_book_entry pricing_price_book_entry_model_check CHECK ((model = ANY (ARRAY['flat'::text, 'per_unit'::text, 'graduated'::text, 'volume'::text, 'package'::text])))
CONSTRAINT bss.pricing_price_book_entry pricing_price_book_entry_pkey PRIMARY KEY (id)
CONSTRAINT bss.pricing_price_book_entry pricing_price_book_entry_reference_state_check CHECK ((reference_state = ANY (ARRAY['confirmation_pending'::text, 'confirmed'::text, 'lost'::text, 'released'::text])))
CONSTRAINT bss.pricing_price_book_entry pricing_price_book_entry_tenant_id_dimension_key_fkey FOREIGN KEY (tenant_id, dimension_key) REFERENCES bss.pricing_dimension_key(tenant_id, key)
CONSTRAINT bss.pricing_reference_op pricing_reference_op_kind_check CHECK ((kind = ANY (ARRAY['create'::text, 'delete'::text, 'rereserve'::text, 'attach'::text, 'release'::text])))
CONSTRAINT bss.pricing_reference_op pricing_reference_op_pkey PRIMARY KEY (op_id)
CONSTRAINT bss.pricing_reference_op pricing_reference_op_ref_kind_check CHECK ((ref_kind = ANY (ARRAY['price_book_entry'::text, 'plan_item'::text])))
CONSTRAINT bss.pricing_reference_op pricing_reference_op_state_check CHECK ((state = ANY (ARRAY['reserving'::text, 'written'::text, 'cancelling'::text, 'releasing'::text, 'done'::text])))
CONSTRAINT bss.pricing_settings pricing_settings_default_timing_check CHECK ((default_timing = ANY (ARRAY['advance'::text, 'arrears'::text])))
CONSTRAINT bss.pricing_settings pricing_settings_pkey PRIMARY KEY (tenant_id)
CONSTRAINT bss.pricing_usage_rating_policy pricing_usage_rating_policy_digest_check CHECK ((digest ~ '^[0-9a-f]{64}$'::text))
CONSTRAINT bss.pricing_usage_rating_policy pricing_usage_rating_policy_pkey PRIMARY KEY (tenant_id, policy_id, version)
CONSTRAINT bss.pricing_usage_rating_policy pricing_usage_rating_policy_tenant_id_digest_key UNIQUE (tenant_id, digest)
CONSTRAINT bss.pricing_usage_rating_policy pricing_usage_rating_policy_tenant_id_policy_id_version_dig_key UNIQUE (tenant_id, policy_id, version, digest)
CONSTRAINT bss.pricing_usage_rating_policy pricing_usage_rating_policy_version_check CHECK ((version > 0))
CONSTRAINT public.bss_pricing_outbox_body bss_pricing_outbox_body_pkey PRIMARY KEY (id)
CONSTRAINT public.bss_pricing_outbox_dead_letters bss_pricing_outbox_dead_letters_partition_id_fkey FOREIGN KEY (partition_id) REFERENCES bss_pricing_outbox_partitions(id)
CONSTRAINT public.bss_pricing_outbox_dead_letters bss_pricing_outbox_dead_letters_pkey PRIMARY KEY (id)
CONSTRAINT public.bss_pricing_outbox_incoming bss_pricing_outbox_incoming_body_id_fkey FOREIGN KEY (body_id) REFERENCES bss_pricing_outbox_body(id)
CONSTRAINT public.bss_pricing_outbox_incoming bss_pricing_outbox_incoming_partition_id_fkey FOREIGN KEY (partition_id) REFERENCES bss_pricing_outbox_partitions(id)
CONSTRAINT public.bss_pricing_outbox_incoming bss_pricing_outbox_incoming_pkey PRIMARY KEY (id)
CONSTRAINT public.bss_pricing_outbox_outgoing bss_pricing_outbox_outgoing_body_id_fkey FOREIGN KEY (body_id) REFERENCES bss_pricing_outbox_body(id)
CONSTRAINT public.bss_pricing_outbox_outgoing bss_pricing_outbox_outgoing_partition_id_fkey FOREIGN KEY (partition_id) REFERENCES bss_pricing_outbox_partitions(id)
CONSTRAINT public.bss_pricing_outbox_outgoing bss_pricing_outbox_outgoing_pkey PRIMARY KEY (id)
CONSTRAINT public.bss_pricing_outbox_partitions bss_pricing_outbox_partitions_pkey PRIMARY KEY (id)
CONSTRAINT public.bss_pricing_outbox_partitions bss_pricing_outbox_partitions_queue_partition_key UNIQUE (queue, partition)
CONSTRAINT public.bss_pricing_outbox_processor bss_pricing_outbox_processor_partition_id_fkey FOREIGN KEY (partition_id) REFERENCES bss_pricing_outbox_partitions(id)
CONSTRAINT public.bss_pricing_outbox_processor bss_pricing_outbox_processor_pkey PRIMARY KEY (partition_id)
CONSTRAINT public.bss_pricing_outbox_trace bss_pricing_outbox_trace_pkey PRIMARY KEY (id)
CONSTRAINT public.bss_pricing_outbox_vacuum_counter bss_pricing_outbox_vacuum_counter_partition_id_fkey FOREIGN KEY (partition_id) REFERENCES bss_pricing_outbox_partitions(id)
CONSTRAINT public.bss_pricing_outbox_vacuum_counter bss_pricing_outbox_vacuum_counter_pkey PRIMARY KEY (partition_id)
CONSTRAINT public.event_broker_producer_registrations event_broker_producer_registrations_pkey PRIMARY KEY (registration_key)
INDEX bss coord_leases_pkey CREATE UNIQUE INDEX coord_leases_pkey ON bss.coord_leases USING btree (key)
INDEX bss idx_pricing_audit_actor CREATE INDEX idx_pricing_audit_actor ON bss.pricing_audit USING btree (tenant_id, actor_ref, written_at)
INDEX bss idx_pricing_audit_subject CREATE INDEX idx_pricing_audit_subject ON bss.pricing_audit USING btree (tenant_id, subject_kind, subject_id, written_at)
INDEX bss idx_pricing_audit_tenant_time CREATE INDEX idx_pricing_audit_tenant_time ON bss.pricing_audit USING btree (tenant_id, written_at)
INDEX bss idx_pricing_idempotency_expires CREATE INDEX idx_pricing_idempotency_expires ON bss.pricing_idempotency USING btree (tenant_id, expires_at)
INDEX bss ix_pricing_approval_unit_queue CREATE INDEX ix_pricing_approval_unit_queue ON bss.pricing_approval_unit USING btree (tenant_id, state, kind, submitted_at)
INDEX bss pricing_acceptance_business CREATE UNIQUE INDEX pricing_acceptance_business ON bss.pricing_acceptance USING btree (tenant_id, order_id, order_version, line_id)
INDEX bss pricing_acceptance_pkey CREATE UNIQUE INDEX pricing_acceptance_pkey ON bss.pricing_acceptance USING btree (tenant_id, id)
INDEX bss pricing_approval_decision_pkey CREATE UNIQUE INDEX pricing_approval_decision_pkey ON bss.pricing_approval_decision USING btree (unit_id, actor, generation)
INDEX bss pricing_approval_policy_pkey CREATE UNIQUE INDEX pricing_approval_policy_pkey ON bss.pricing_approval_policy USING btree (tenant_id, kind)
INDEX bss pricing_approval_unit_item_pkey CREATE UNIQUE INDEX pricing_approval_unit_item_pkey ON bss.pricing_approval_unit_item USING btree (unit_id, item_type, item_id)
INDEX bss pricing_approval_unit_pkey CREATE UNIQUE INDEX pricing_approval_unit_pkey ON bss.pricing_approval_unit USING btree (id)
INDEX bss pricing_audit_pkey CREATE UNIQUE INDEX pricing_audit_pkey ON bss.pricing_audit USING btree (audit_id)
INDEX bss pricing_commercial_command_acceptance CREATE INDEX pricing_commercial_command_acceptance ON bss.pricing_commercial_command USING btree (tenant_id, acceptance_id)
INDEX bss pricing_commercial_command_hold CREATE INDEX pricing_commercial_command_hold ON bss.pricing_commercial_command USING btree (tenant_id, hold_id)
INDEX bss pricing_commercial_command_pkey CREATE UNIQUE INDEX pricing_commercial_command_pkey ON bss.pricing_commercial_command USING btree (tenant_id, id)
INDEX bss pricing_commercial_command_scope CREATE UNIQUE INDEX pricing_commercial_command_scope ON bss.pricing_commercial_command USING btree (tenant_id, caller_tenant_id, caller_id, operation, idempotency_key)
INDEX bss pricing_dimension_key_pkey CREATE UNIQUE INDEX pricing_dimension_key_pkey ON bss.pricing_dimension_key USING btree (tenant_id, key)
INDEX bss pricing_hold_acceptance CREATE UNIQUE INDEX pricing_hold_acceptance ON bss.pricing_hold USING btree (tenant_id, acceptance_id)
INDEX bss pricing_hold_pkey CREATE UNIQUE INDEX pricing_hold_pkey ON bss.pricing_hold USING btree (tenant_id, id)
INDEX bss pricing_idempotency_pkey CREATE UNIQUE INDEX pricing_idempotency_pkey ON bss.pricing_idempotency USING btree (tenant_id, endpoint, client_key)
INDEX bss pricing_plan_code CREATE UNIQUE INDEX pricing_plan_code ON bss.pricing_plan USING btree (tenant_id, code)
INDEX bss pricing_plan_item_pkey CREATE UNIQUE INDEX pricing_plan_item_pkey ON bss.pricing_plan_item USING btree (id)
INDEX bss pricing_plan_item_sku CREATE UNIQUE INDEX pricing_plan_item_sku ON bss.pricing_plan_item USING btree (revision_id, sku_id)
INDEX bss pricing_plan_pkey CREATE UNIQUE INDEX pricing_plan_pkey ON bss.pricing_plan USING btree (id)
INDEX bss pricing_plan_revision_no CREATE UNIQUE INDEX pricing_plan_revision_no ON bss.pricing_plan_revision USING btree (plan_id, rev_no)
INDEX bss pricing_plan_revision_open CREATE UNIQUE INDEX pricing_plan_revision_open ON bss.pricing_plan_revision USING btree (plan_id) WHERE (state = ANY (ARRAY['draft'::text, 'pending'::text]))
INDEX bss pricing_plan_revision_pkey CREATE UNIQUE INDEX pricing_plan_revision_pkey ON bss.pricing_plan_revision USING btree (id)
INDEX bss pricing_plan_revision_published CREATE UNIQUE INDEX pricing_plan_revision_published ON bss.pricing_plan_revision USING btree (plan_id) WHERE (state = 'published'::text)
INDEX bss pricing_plan_revision_scheduled CREATE UNIQUE INDEX pricing_plan_revision_scheduled ON bss.pricing_plan_revision USING btree (plan_id) WHERE (state = 'scheduled'::text)
INDEX bss pricing_price_approved_start CREATE UNIQUE INDEX pricing_price_approved_start ON bss.pricing_price USING btree (price_book_entry_id, COALESCE(dim_value, ''::text), effective_from) WHERE ((state = 'approved'::text) AND (change_kind = 'set'::text))
INDEX bss pricing_price_book_entry_key CREATE UNIQUE INDEX pricing_price_book_entry_key ON bss.pricing_price_book_entry USING btree (book_id, sku_id, charge_kind, COALESCE(period, ''::text), model, COALESCE(usage_policy_digest, ''::text))
INDEX bss pricing_price_book_entry_pkey CREATE UNIQUE INDEX pricing_price_book_entry_pkey ON bss.pricing_price_book_entry USING btree (id)
INDEX bss pricing_price_book_pkey CREATE UNIQUE INDEX pricing_price_book_pkey ON bss.pricing_price_book USING btree (id)
INDEX bss pricing_price_book_tenant_id_code_key CREATE UNIQUE INDEX pricing_price_book_tenant_id_code_key ON bss.pricing_price_book USING btree (tenant_id, code)
INDEX bss pricing_price_book_tenant_id_id_key CREATE UNIQUE INDEX pricing_price_book_tenant_id_id_key ON bss.pricing_price_book USING btree (tenant_id, id)
INDEX bss pricing_price_chain CREATE INDEX pricing_price_chain ON bss.pricing_price USING btree (price_book_entry_id, dim_value, effective_from) WHERE (state = 'approved'::text)
INDEX bss pricing_price_pkey CREATE UNIQUE INDEX pricing_price_pkey ON bss.pricing_price USING btree (id)
INDEX bss pricing_price_price_book_entry_id_version_no_key CREATE UNIQUE INDEX pricing_price_price_book_entry_id_version_no_key ON bss.pricing_price USING btree (price_book_entry_id, version_no)
INDEX bss pricing_reference_op_due CREATE INDEX pricing_reference_op_due ON bss.pricing_reference_op USING btree (state, next_attempt_at) WHERE (state <> 'done'::text)
INDEX bss pricing_reference_op_pkey CREATE UNIQUE INDEX pricing_reference_op_pkey ON bss.pricing_reference_op USING btree (op_id)
INDEX bss pricing_settings_pkey CREATE UNIQUE INDEX pricing_settings_pkey ON bss.pricing_settings USING btree (tenant_id)
INDEX bss pricing_usage_rating_policy_pkey CREATE UNIQUE INDEX pricing_usage_rating_policy_pkey ON bss.pricing_usage_rating_policy USING btree (tenant_id, policy_id, version)
INDEX bss pricing_usage_rating_policy_tenant_id_digest_key CREATE UNIQUE INDEX pricing_usage_rating_policy_tenant_id_digest_key ON bss.pricing_usage_rating_policy USING btree (tenant_id, digest)
INDEX bss pricing_usage_rating_policy_tenant_id_policy_id_version_dig_key CREATE UNIQUE INDEX pricing_usage_rating_policy_tenant_id_policy_id_version_dig_key ON bss.pricing_usage_rating_policy USING btree (tenant_id, policy_id, version, digest)
INDEX public bss_pricing_outbox_body_pkey CREATE UNIQUE INDEX bss_pricing_outbox_body_pkey ON public.bss_pricing_outbox_body USING btree (id)
INDEX public bss_pricing_outbox_dead_letters_pkey CREATE UNIQUE INDEX bss_pricing_outbox_dead_letters_pkey ON public.bss_pricing_outbox_dead_letters USING btree (id)
INDEX public bss_pricing_outbox_incoming_pkey CREATE UNIQUE INDEX bss_pricing_outbox_incoming_pkey ON public.bss_pricing_outbox_incoming USING btree (id)
INDEX public bss_pricing_outbox_outgoing_pkey CREATE UNIQUE INDEX bss_pricing_outbox_outgoing_pkey ON public.bss_pricing_outbox_outgoing USING btree (id)
INDEX public bss_pricing_outbox_partitions_pkey CREATE UNIQUE INDEX bss_pricing_outbox_partitions_pkey ON public.bss_pricing_outbox_partitions USING btree (id)
INDEX public bss_pricing_outbox_partitions_queue_partition_key CREATE UNIQUE INDEX bss_pricing_outbox_partitions_queue_partition_key ON public.bss_pricing_outbox_partitions USING btree (queue, partition)
INDEX public bss_pricing_outbox_processor_pkey CREATE UNIQUE INDEX bss_pricing_outbox_processor_pkey ON public.bss_pricing_outbox_processor USING btree (partition_id)
INDEX public bss_pricing_outbox_trace_pkey CREATE UNIQUE INDEX bss_pricing_outbox_trace_pkey ON public.bss_pricing_outbox_trace USING btree (id)
INDEX public bss_pricing_outbox_vacuum_counter_pkey CREATE UNIQUE INDEX bss_pricing_outbox_vacuum_counter_pkey ON public.bss_pricing_outbox_vacuum_counter USING btree (partition_id)
INDEX public event_broker_producer_registrations_pkey CREATE UNIQUE INDEX event_broker_producer_registrations_pkey ON public.event_broker_producer_registrations USING btree (registration_key)
INDEX public idx_bss_pricing_outbox_dl_replayable CREATE INDEX idx_bss_pricing_outbox_dl_replayable ON public.bss_pricing_outbox_dead_letters USING btree (status, deadline) WHERE ((status)::text = ANY ((ARRAY['pending'::character varying, 'reprocessing'::character varying])::text[]))
INDEX public idx_bss_pricing_outbox_dl_status_failed CREATE INDEX idx_bss_pricing_outbox_dl_status_failed ON public.bss_pricing_outbox_dead_letters USING btree (status, failed_at DESC)
INDEX public idx_bss_pricing_outbox_incoming_body_id CREATE INDEX idx_bss_pricing_outbox_incoming_body_id ON public.bss_pricing_outbox_incoming USING btree (body_id)
INDEX public idx_bss_pricing_outbox_incoming_partition CREATE INDEX idx_bss_pricing_outbox_incoming_partition ON public.bss_pricing_outbox_incoming USING btree (partition_id, id)
INDEX public idx_bss_pricing_outbox_outgoing_body_id CREATE INDEX idx_bss_pricing_outbox_outgoing_body_id ON public.bss_pricing_outbox_outgoing USING btree (body_id)
INDEX public idx_bss_pricing_outbox_outgoing_partition_seq CREATE UNIQUE INDEX idx_bss_pricing_outbox_outgoing_partition_seq ON public.bss_pricing_outbox_outgoing USING btree (partition_id, seq)
INDEX public idx_bss_pricing_outbox_trace_key CREATE INDEX idx_bss_pricing_outbox_trace_key ON public.bss_pricing_outbox_trace USING btree (trace)
INDEX public idx_bss_pricing_outbox_trace_mail CREATE INDEX idx_bss_pricing_outbox_trace_mail ON public.bss_pricing_outbox_trace USING btree (owner_instance) WHERE ((completed_at IS NOT NULL) AND (notified_at IS NULL))
INDEX public idx_bss_pricing_outbox_trace_retrying CREATE INDEX idx_bss_pricing_outbox_trace_retrying ON public.bss_pricing_outbox_trace USING btree (owner_instance) WHERE ((completed_at IS NULL) AND (retrying_since IS NOT NULL))
TRIGGER bss.pricing_audit trg_pricing_audit_append_only CREATE TRIGGER trg_pricing_audit_append_only BEFORE DELETE OR UPDATE ON bss.pricing_audit FOR EACH ROW EXECUTE FUNCTION bss.pricing_audit_append_only()
TRIGGER bss.pricing_usage_rating_policy pricing_usage_policy_immutable CREATE TRIGGER pricing_usage_policy_immutable BEFORE DELETE OR UPDATE ON bss.pricing_usage_rating_policy FOR EACH ROW EXECUTE FUNCTION bss.pricing_usage_policy_immutable()
FUNCTION bss pricing_audit_append_only CREATE OR REPLACE FUNCTION bss.pricing_audit_append_only() RETURNS trigger LANGUAGE plpgsql AS $function$ BEGIN IF TG_OP = 'DELETE' THEN RAISE EXCEPTION 'pricing_audit is append-only: DELETE is not permitted'; END IF; IF OLD.seal_state = 'unsealed' AND NEW.seal_state = 'sealed' AND NEW.chain_id IS NOT NULL AND NEW.seq IS NOT NULL AND NEW.row_hash IS NOT NULL AND NEW.audit_id IS NOT DISTINCT FROM OLD.audit_id AND NEW.tenant_id IS NOT DISTINCT FROM OLD.tenant_id AND NEW.actor_ref IS NOT DISTINCT FROM OLD.actor_ref AND NEW.action IS NOT DISTINCT FROM OLD.action AND NEW.subject_kind IS NOT DISTINCT FROM OLD.subject_kind AND NEW.subject_id IS NOT DISTINCT FROM OLD.subject_id AND NEW.subject_revision IS NOT DISTINCT FROM OLD.subject_revision AND NEW.error_code IS NOT DISTINCT FROM OLD.error_code AND NEW.attempted_key IS NOT DISTINCT FROM OLD.attempted_key AND NEW.reason IS NOT DISTINCT FROM OLD.reason AND NEW.correlation_id IS NOT DISTINCT FROM OLD.correlation_id AND NEW.written_at IS NOT DISTINCT FROM OLD.written_at AND NEW.session_id IS NOT DISTINCT FROM OLD.session_id AND NEW.ceremony_ref IS NOT DISTINCT FROM OLD.ceremony_ref THEN RETURN NEW; END IF; RAISE EXCEPTION 'pricing_audit is append-only: % is not permitted', TG_OP; END; $function$
FUNCTION bss pricing_usage_policy_immutable CREATE OR REPLACE FUNCTION bss.pricing_usage_policy_immutable() RETURNS trigger LANGUAGE plpgsql AS $function$ BEGIN RAISE EXCEPTION 'usage rating policies are append-only'; END; $function$
