ALTER TABLE "users" ADD COLUMN "is_byok_enabled" boolean DEFAULT false NOT NULL;
--> statement-breakpoint
-- Grandfather in anyone who already has a BYOK AI key configured -- BYOK
-- is now its own gate (previously covered by is_developer, per the
-- migration in 0060), so without this backfill every existing BYOK setup
-- would silently break the moment this migration runs.
UPDATE "users" SET "is_byok_enabled" = true WHERE "id" IN (
	SELECT "user_id" FROM "user_ai_keys"
);