Changelog

All changes done on the content or schema of the Magicline Enterprise Data Warehouse are described in the following list, beginning November 2023.

2026-01-15 (erp_v2 release)

Summary

We are excited to introduce a new real-time data schema, erp_v2, which will replace the current batch schema. This update provides access to data with a latency of only a few minutes, enabling near real-time analytics. To ensure a smooth transition and avoid disruptions to your existing data pipelines, we have designed the new schema to be largely backward-compatible with the legacy one, requiring only minor adjustments to your existing data pipelines.

The migration is currently underway and will be rolled out to all customers throughout Q1 2026.

Migration Guide: Switching from Batch to Real-Time Schema

This guide provides a high-level overview of the steps required to migrate your data pipelines from the legacy batch schema to the new real-time schema. The changes are designed to be minimal, ensuring a quick and straightforward transition.

What stays the same? - Database Host and Credentials: You can continue using your existing database credentials. - Table and Column Names: The naming of tables and columns remains unchanged.

What is changing? - Schema Name: The primary change is the schema name. You will need to update your queries to reference the real-time schema, erp_v2, instead of the legacy batch one. - Data Freshness: The new schema provides data in near real-time (minutes delay) compared to the daily updates of the batch schema. - Column Types: To support the new real-time data model, we have made minor technical adjustments to some column types and business logic. These changes are designed to be seamless from a business perspective and are detailed for your technical teams in the "Action Required" section below.

Action Required: 1. Update Schema References: In your data pipeline scripts and queries, replace all references to the legacy schema with erp_v2. 2. Review Column Type Changes: Carefully review the "Changed" and "Removed" sections below and update your data pipelines accordingly. Here are the key areas to focus on: - ID Columns: Hash based ID columns have been changed from bigint to character varying. If your scripts perform type casting on these columns to integer types, you must update them to handle string-based IDs. - Data Type Changes: The super data type has been replaced with character varying for some columns, and the length of other character varying columns has been increased. Ensure your scripts can accommodate these changes. - Business Logic: The calculation for fct_lead_lifetime.lead_status has been updated slightly. Review your analytics and reports that use this field to ensure they align with the new logic. - Removed Columns: The dim_customer.age column has been removed. You will need to update any scripts that use this column to calculate age from dim_customer.date_of_birth instead. 3. Test Your Pipelines: Before switching over completely, test your updated pipelines in a staging environment to ensure everything works as expected.

By following these steps, you can seamlessly transition to our new real-time schema and take advantage of up-to-the-minute data insights.

Added

  • New schema erp_v2 created as near real time version of the DWH. It is largely compatible with the legacy schema,
  • Add new table dim_rate_term_configuration to store configuration rules for contract terms, extensions, cancellations, and idle periods associated with rates.
  • Add new table dim_contract_voucher_definition to store definitions of vouchers that can be generated and applied to contracts.
  • Add new table dim_contract_voucher_rate_discount_period to define the discount structure (e.g., percentage or absolute amount) for specific periods and rates of contract vouchers.
  • Add new table fct_contract_voucher to track the actual usage of vouchers, including redemption and withdrawal dates.
  • Add new table dim_company_code to store codes/tags that can be assigned to companies for categorization and filtering.
  • Add new table bridge_company_to_company_code to link companies to their assigned codes, enabling many-to-many relationships.
  • Add new table bridge_company_to_organization_unit to track which companies have access to which studios with their permission levels.
  • Add new column dim_company.chamber_of_commerce_number to store the chamber of commerce registration number.
  • Add new column dim_company.vat_number to store the VAT identification number.
  • Add new columns to dim_company regarding contact person information.
  • Add new columns to dim_company regarding invoice contact person information.

Deprecated

  • The legacy batch schema is deprecated and will be removed after a transition period. Please use the new real-time schema erp_v2 instead.

Removed

  • Column dim_customer.age has been removed. Users should calculate age from dim_customer.date_of_birth instead.

Changed

  • Columns *.last_updated now reflect the individual time a record last went through the real-time ETL process, instead of when the full table was last updated in the batch system. This gives a more granular view of data freshness.
  • Column fct_lead_lifetime.lead_status has changed its logic on updating the status - for customers that are not managed in the ERPs lead management, previously the status was changed from PENDING to LOSS if no contract was created for a customer after 7 days of customer creation. Now the 7 days logic was dropped and the status will remain PENDING indefinitely until a contract is created.
  • Column dim_customer.age is no longer populated - users should calculate age from dim_customer.date_of_birth instead.
  • Type Changes (44 Changes, minor technical impact):
    • Column type changes from bigint to character varying (39 Changes) - Due to hash based ID columns changing their hashing algorithm:
      • dim_contract_cancellation_reason.contract_cancellation_reason_id
      • dim_contract_payment_frequency.contract_payment_frequency_id
      • dim_contract_term.contract_term_id
      • dim_contract_property.contract_property_id
      • fct_contract.contract_cancellation_reason_id
      • fct_contract.contract_payment_frequency_id
      • fct_contract.contract_property_id
      • fct_contract.contract_term_id
      • fct_contract_cancellation.contract_cancellation_property_id
      • fct_contract_cancellation.currency_id
      • dim_customer_communication_consent.customer_communication_consent_id
      • bridge_customer_to_customer_code.customer_to_customer_code_id
      • dim_currency.currency_id (Currency follows ISO 4217 standard)
      • fct_payment_run.currency_id (Currency follows ISO 4217 standard)
      • fct_payment_run.payment_run_id
      • fct_payment_run.payment_run_property_id
      • fct_idle_period.currency_id
      • fct_idle_period.idle_period_property_id
      • dim_product.product_id
      • fct_revenue.currency_id (Currency follows ISO 4217 standard)
      • fct_revenue.product_id
      • dim_purchased_contingent.purchased_contingent_id
      • fct_service_usage.service_usage_id
      • fct_trainer_class_appointments.trainer_appointment_status_id
      • dim_contract_cancellation_property.contract_cancellation_property_id
      • dim_opening_hours.opening_hours_id
      • fct_revenue_cash_based.product_id
      • fct_revenue_cash_based.currency_id
      • fct_employee_access.employee_access_id
      • dim_trainer_appointment_status.trainer_appointment_status_id
      • dim_rate_localized.rate_localized_id
      • dim_customer_custom_field.customer_custom_field_id
      • dim_cancellation_reason_localized.cancelation_reason_localized_id
      • dim_closing_hours.closing_hours_id
      • dim_campaign.campaign_id
      • fct_class_event.class_event_property_id
      • dim_class_event_property.class_event_property_id
      • dim_idle_period_property.idle_period_property_id
      • dim_payment_run_property.payment_run_property_id
    • Column type changes from super to character varying (1 Change):
      • dim_customer_communication_consent.communication_channels
    • Column length changes from character varying(256) to character varying(65535) (4 Changes):
      • dim_service.description
      • fct_revenue.description
      • fct_revenue_cash_based.revenue_description
      • dim_customer_custom_field.field_value

2025-10-30

Summary

Add customer_studio_history fact table.

Added

  • Add new table fct_customer_studio_history to track customers moving to different studios.

2025-10-23

Summary

Add cash-based revenue fact table.

Added

  • Add new table fct_revenue_cash_based to provide a cash-basis accounting view of revenue.

2025-10-22

Summary

Enhanced customer custom fields to include member level assignments.

Changed

  • Enhanced dim_customer_custom_field to include custom field values from member profiles in addition to lead questionnaires.
  • Add new column dim_customer_custom_field.level to distinguish between custom fields captured during lead acquisition (LEAD) and custom fields assigned to active members (MEMBER).

2025-10-14

Summary

Add employee access and username information to employees.

Added

  • Add new column dim_employee.username to store the username of employees in the ERP system.
  • Add new table fct_employee_access to track which employees have access to which studios through which roles, enabling analysis of role-based access control permissions.

2025-10-08

Summary

Add localized cancellation reasons and customer custom fields.

Added

  • Add new table dim_customer_custom_field to store custom field values assigned to customers through additional fields.
  • Add new table dim_cancellation_reason_localized to store translated cancellation reason names for different locales, enabling users to view cancellation reasons in their preferred language.
  • Add new column dim_contract_cancellation_reason.cancellation_reason_id to link to the localized cancellation reasons.

2025-09-30

Summary

Add latitude, longitude, opening hours and closing hours information about dim_organization_unit for geospatial analysis and effective opening hours tracking.

Added

  • Add new column dim_organization_unit.latitude to store the latitude coordinate of gym locations in decimal degrees (WGS84).
  • Add new column dim_organization_unit.longitude to store the longitude coordinate of gym locations in decimal degrees (WGS84).
  • Add new table dim_opening_hours to store the general opening hours for organization units by day of week.
  • Add new table dim_closing_hours to store irregular or recurring closure times for organization units that are exceptions to regular opening hours.

2025-09-18

Summary

Add organization unit code dimension and bridge.

Added

  • Add new table dim_organization_unit_code for codes/tags assigned to organization units (studios).
  • Add new table bridge_organization_unit_to_organization_unit_code to link studios to their codes.

2025-08-27

Summary

Add main_contract_id relation to fct_contract to link module/flat-fee contracts to their main contract.

Added

  • Add new column fct_contract.main_contract_id to link module/flat-fee contracts to their main contract.

2025-08-26

Summary

Add fct_service_usage table to track usage of various services by customers. (Already available since 2025-08-13).

Added

  • Add new table fct_service_usage to track usage of services by customers.

2025-08-25

Summary

Add columns to refer to third party systems.

Added

  • Add new column dim_customer.third_party_id to refer to a customer in a third party system
  • Add new column fct_contract.third_party_id to refer to a contract in a third party system

2025-05-08

Summary

Add new column to fct_contract

Added

  • Add new column fct_contract_price_history.last_date_before_contract_renewal to store date of last possible cancellation of contract

2025-05-07

Summary

Add documentation on how to create late-binding views.

2025-04-23

Summary

Add dim_rate_localized table to provide localized public rate names.

Added

  • Add new table dim_rate_localized to provide localized public rate names.

2025-04-22

Summary

Add new columns to fct_contract_price_history

Added

  • Add new column fct_contract_price_history.company_price to store the part of the cost paid by the company
  • Add new column fct_contract_price_history.customer_price to store the part of the cost paid by the customer
  • Add new column fct_contract_price_history.company_price_change to store the change from the previous company price
  • Add new column fct_contract_price_history.customer_price_change to store the change from the previous customer price

2025-02-13

Summary

Add campaigns to fct_lead_lifetime.

Added

  • Add new column fct_lead_lifetime.campaign_id to enable tracking of leads by campaign
  • Add new table dim_campaign to store campaign information

Deprecated

  • Deprecate fct_lead_lifetime.source_campaign with mixed content in favor of fct_lead_lifetime.campaign_id

2025-01-20

Summary

Fix fct_revenue not including payment abandonments (CHARGES_SALES>ADDITIONAL_CHARGE) that have been reversed.

2025-01-09

Summary

Include whitelisted companies in dim_company table.

Misc

  • Adapted dim_company table to include companies that are whitelisted for the studios related to this DWH instance.

2025-01-07

Summary

Improvements on fct_contract table regarding is_reversed and company_id columns.

Added

  • New column fct_contract.is_reversed moved from dim_contract_property.disabled for better visibility

Misc

  • Adapted docs on fct_contract and dim_contract_property.disabled
  • Adapted fct_contract.company_id to also include companies associated using contract vouchers

Deprecated

  • Deprecate column dim_contract_property.disabled in favor of fct_contract.is_reversed

2024-10-10

Summary

Adding new table fct_contract_term_dates

2024-10-04

Summary

Adding adjustment_type to fct_revenue

Added

  • Add new column fct_revenue.adjustment_type to determine adjustment or discount

2024-09-12

Summary

Add imported_contract_number to fct_contract

Added

  • Add new column imported_contract_number to fct_contract table, to identify contracts imported from a previous system

2024-09-06

Summary

Adding description to fct_revenue

Added

  • Add new column fct_revenue.description to describe the revenue entry

2024-08-29

Summary

Add dim_customer_communication_consent table.

Added

  • Add new table dim_customer_communication_consent to enable querying categories and channels over which communication to a customer is allowed.

2024-08-24

Summary

Adapt various references and docs to be more agnostic of the source system data is coming from.

Added

  • dim_appointment.source: WEBCLIENT
  • dim_contract_property.sales_source: WEBCLIENT
  • dim_customer.customer_origin: WEBCLIENT
  • fct_customer_appointment.booking_source: WEBCLIENT

2024-07-31

Summary

Fix certain entries in fct_revenue mapping to UNCATEGORIZED/UNKNOWN dim_revenue_group.

2024-07-29

Summary

Add contract price history and current price.

Added

  • Add new table fct_contract_price_history to enable analytics on contract prices, price changes and the reasons leading to those changes
  • Add new column fct_contract.current_monthly_price to enable easy access to the current (adjusted) normalized price of a contract
  • Add new column dim_contract_payment_frequency.payment_frequency_current_price to store the current (adjusted) price that will be booked at related frequency

2024-06-18

Summary

Add contract relation to fct_idle_period and email verification status to dim_customer.

Added

  • Add new column fct_idle_period.contract_id to enable uniquely relating to idle periods to contracts
  • Add new column dim_customer.email_verification_status to identify email addresses that are verified or unverified

2024-05-06

Summary

Add service period and direct contract relation to fct_revenue.

Added

  • Add new column fct_revenue.service_period_start_date to get the service period revenue is generated for
  • Add new column fct_revenue.service_period_end_date to get the service period revenue is generated for
  • Add new column fct_revenue.contract_id to enable uniquely relating to the contract generating revenue (Fct to Fct join possible here due to n:1 relation)

2024-04-26

Summary

Add studio_prefix and imported_customer_number.

Added

  • Add new column dim_organization_unit.studio_prefix as a human-readable identifier of a studio
  • Add new column dim_customer.imported_customer_number to identify customers imported from a previous system

2024-04-09

Summary

Add ways to identify customers and contracts by customer codes and Corporate Fitness companies.

Added

  • Add new table dim_customer_code for codes that are set on customers
  • Add new table bridge_customer_to_customer_code to link between customers and customer codes
  • Add new table dim_company for companies of Corporate Fitness program
  • Add new column fct_contract.company_id to link between contracts and companies

2024-04-05

Summary

Fix fct_contract.rate_id missing on MODULE/FLAT_FEE contracts

2024-03-11

Summary

Cover essential lead conversion metrics.

Added

  • Add new table fct_lead_lifetime

2024-03-08

Summary

Add customer_origin to dim_customer

Added

  • Add new column customer_origin to dim_customer table

2024-03-06

Summary

Add locale to dim_customer

Added

  • Add new column locale to dim_customer table

2024-02-22

Summary

Add payment_frequency information to contracts.

Added

  • Add new table dim_contract_payment_frequency
  • Add new columns to fct_contract table:
    • contract_payment_frequency_id
    • original_monthly_price
    • original_total_price

2024-02-05

Summary

Enable this Changelog to inform about updates.

2023-11-16

Summary

Improvements of contract related tables.

Added

  • Add following new columns to fct_contract table:
    • cancellation_fee
    • cancellation_date_id
    • cancellation_receipt_date_id
    • pre_cancellation_end_date_id
    • contract_cancellation_reason_id
  • Add new column contract_status to dim_contract_property table.
  • Add new dim_contract_cancellation_reason table.
  • Add column fct_contract.cancellation_date_id (renamed from cancelation_date_id)

Removed

  • Remove fct_contract.cancelation_date_id (renamed into cancellation_date_id)

Deprecated

  • Mark fct_contract_cancellation table as deprecated.
  • Mark dim_contract_cancellation_property table as deprecated.
  • Mark dim_cancellation_reason table as deprecated.