GoodAnalytics.Migrations.V03 (GoodAnalytics v0.1.1)

Copy Markdown View Source

Rename customer_* columns on ga_visitors to person_*.

The original customer_ prefix prejudged the host's relationship type and overlapped semantically with the customer value in the status enum. The neutral person_ prefix accurately describes these as the host-app's projection of who the visitor is, regardless of lifecycle stage.

Columns renamed:

  • ga_visitors.customer_external_idperson_external_id
  • ga_visitors.customer_emailperson_email
  • ga_visitors.customer_nameperson_name
  • ga_visitors.customer_metadataperson_metadata

Indexes renamed:

  • idx_ga_visitors_customeridx_ga_visitors_person_external_id
  • idx_ga_visitors_emailidx_ga_visitors_person_email

Renames take a brief AccessExclusiveLock per ALTER but no data movement (PostgreSQL renames are catalog-only).

Summary

Functions

Rolls back this version's migration by executing the down SQL file.

Applies this version's migration by executing the up SQL file.

Functions

down(opts \\ [])

@spec down(keyword()) :: :ok

Rolls back this version's migration by executing the down SQL file.

up(opts \\ [])

@spec up(keyword()) :: :ok

Applies this version's migration by executing the up SQL file.