Files
uptimesebi/internal/migrations/sql/00018_platform_admins.sql
T
Sebastian UnterschützandClaude Opus 5.5 607798d742 feat(store): let regions and agents belong to the platform or one organization
Regions are identified by id so organizations can reuse keys. Triggers
keep agents in regions of the same owner and monitors in platform or own
regions. Platform admins are a user flag.

Refs #52

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 01:36:02 +01:00

9 lines
353 B
SQL

-- +goose Up
-- Platform admins manage what all organizations share: platform regions,
-- checkers and status page servers. Granted with "api admin grant"; the
-- first user of a self-hosted installation becomes one at signup.
ALTER TABLE users ADD COLUMN is_admin boolean NOT NULL DEFAULT false;
-- +goose Down
ALTER TABLE users DROP COLUMN is_admin;