Event sources are identified by name instead of an ID #2127

Closed
opened 2026-11-23 13:13:56 +00:00 by sam · 1 comment
Owner

events.sources has no ID column: its primary key is (org_id, name), and the name is also the webhook path. These columns store the source name as text, with no foreign key: events.events.source, events.event_types.source, events.triggers.source, events.groups.source, events.mappings.source_hint and drafts.drafts.source. A source already has a separate display_name, so name serves only as the key and the webhook path.

Done when

events.sources has a UUID primary key that the tables above reference. The webhook path is a separate unique column that can be changed without touching stored events, event types or triggers.

`events.sources` has no ID column: its primary key is `(org_id, name)`, and the name is also the webhook path. These columns store the source name as text, with no foreign key: `events.events.source`, `events.event_types.source`, `events.triggers.source`, `events.groups.source`, `events.mappings.source_hint` and `drafts.drafts.source`. A source already has a separate `display_name`, so `name` serves only as the key and the webhook path. ## Done when `events.sources` has a UUID primary key that the tables above reference. The webhook path is a separate unique column that can be changed without touching stored events, event types or triggers.
sam added the bughigh labels 2026-11-23 13:13:56 +00:00
Author
Owner

Completed in 30aa351eb (merged in 0d25c93ea).

Completed in 30aa351eb (merged in 0d25c93ea).
sam closed this issue 2026-11-23 18:18:27 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#2127