17 lines
831 B
SQL
17 lines
831 B
SQL
-- SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
-- SPDX-FileCopyrightText: 2025-2026 Christian Galo
|
|
|
|
-- +goose Up
|
|
-- The environment the event came from, in the provider's own vocabulary:
|
|
-- Stripe writes `live` or `test`, from the event envelope's livemode.
|
|
-- core.webhook_events is provider-neutral, so this column holds each
|
|
-- provider's own word the way provider, provider_event_id, event_type and
|
|
-- provider_event_at already do, and carries no CHECK constraint for the
|
|
-- same reason event_type carries none: a second provider's vocabulary is
|
|
-- not the console's to enumerate. Rows from before this migration keep
|
|
-- NULL, which names no environment.
|
|
ALTER TABLE core.webhook_events ADD COLUMN provider_environment TEXT;
|
|
|
|
-- +goose Down
|
|
ALTER TABLE core.webhook_events DROP COLUMN provider_environment;
|