-- Ported from the SQLite migration of the same number. Same version, same -- meaning, different spelling: SQLite's storage classes and PostgreSQL's types -- do not line up, and one shared file would be a promise neither could keep. -- -- Times are milliseconds since the epoch in BIGINT, exactly as in SQLite, -- rather than TIMESTAMPTZ. The Go code reads and writes int64 milliseconds -- everywhere; converting here would mean two time representations in one -- codebase, and the conversion would be the thing that is wrong at 2am. -- Who may see the cluster. -- -- Until now the answer was "whoever has a shell on the control plane", because -- the dashboard lived on a loopback-bound port. Serving it over the web needs -- an actual answer, and this is the smallest one that is not a lie: a flag on -- an account that already has a password, a session and a CSRF token. -- -- Deliberately not a role system. One bit is enough for "can see the cluster" -- and impossible to get subtly wrong; roles arrive when there is a second -- distinction worth drawing. ALTER TABLE users ADD COLUMN is_admin BIGINT NOT NULL DEFAULT 0;