bridge_discount_campaign_to_organization_unit


Description

Maps studios (organization units) to their currently active discount campaign. One row per studio — at most one active discount campaign per studio is represented here. This is a point-in-time snapshot sourced from active_organization_unit_configuration, which holds at most one active discount campaign configuration per studio at any given time.

Important limitation: When a studio deactivates a discount campaign, the corresponding row is hard-deleted — no historical record is preserved.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
discount_campaign_to_organization_unit_id varchar 256 null

The primary key of this table. Surrogate key derived from (organization_unit_id, discount_campaign_id).

discount_campaign_id int8 19 null
dim_discount_campaign.discount_campaign_id bridge_discount_campaign_to_organization_unit_discount_campaign_id_fkey R

The discount campaign currently active for this studio.

organization_unit_id int8 19 null
dim_organization_unit.organization_unit_id bridge_discount_campaign_to_organization_unit_organization_unit_id_fkey R

The studio for which this discount campaign is currently active.

last_updated timestamptz 35 null

System column. UTC Timestamp at which entry was calculated (lags shortly behind source system).

Relationships