Files
OmniRoute/src/lib/db/migrations/086_api_key_allowed_quotas.sql
diegosouzapw 58a7d97b3f Merge branch 'release/v3.8.8' into feat/quota-share-redesign
# Conflicts:
#	src/lib/db/apiKeys.ts
#	src/lib/db/migrationRunner.ts
#	src/server/authz/policies/management.ts
#	src/server/authz/routeGuard.ts
#	tests/unit/route-guard-private-lan.test.ts
2026-05-31 21:08:30 -03:00

9 lines
464 B
SQL

-- 085: Per-API-key quota-pool allow-list (Phase A1 — Quota Share redesign).
--
-- Adds `allowed_quotas` as a JSON TEXT array of quota-pool IDs. Empty array
-- means no quota-pool restriction (all pools accessible). Non-empty array
-- limits the key to the listed pool IDs only (enforcement added in Phase A2).
-- Idempotent via ADD COLUMN; safe to run more than once on older schemas.
ALTER TABLE api_keys ADD COLUMN allowed_quotas TEXT NOT NULL DEFAULT '[]';