Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

602 B
Raw Blame
-- The wait-until-event feature is not yet live, so we drop existing data and
-- re-create the column as TEXT so non-UUID person identifiers (UUIDT, group keys)
-- flow through without coercion.
--
-- DROP + ADD in a single ALTER keeps the column atomic from other sessions'
-- view: they see the table either with the old UUID column or with the new TEXT
-- column, never with no `person_id` at all. The dependent index is dropped here
-- and recreated CONCURRENTLY in the next migration.
SET lock_timeout = '5s';
ALTER TABLE cyclotron_jobs DROP COLUMN IF EXISTS person_id, ADD COLUMN person_id TEXT;