-- Replace the two-state is_private flag with a three-state visibility token
-- (public / internal / private), GitLab-style. The is_private column is left in
-- place (SQLite cannot easily drop columns) but is no longer read or written.
ALTER TABLE repos ADD COLUMN visibility TEXT NOT NULL DEFAULT 'private';
UPDATE repos SET visibility = CASE WHEN is_private = 1 THEN 'private' ELSE 'public' END;
