028_add_usage_logs_user_agent.sql 454 B

12345678910
  1. -- Add user_agent column to usage_logs table
  2. -- Records the User-Agent header from API requests for analytics and debugging
  3. ALTER TABLE usage_logs
  4. ADD COLUMN IF NOT EXISTS user_agent VARCHAR(512);
  5. -- Optional: Add index for user_agent queries (uncomment if needed for analytics)
  6. -- CREATE INDEX IF NOT EXISTS idx_usage_logs_user_agent ON usage_logs(user_agent);
  7. COMMENT ON COLUMN usage_logs.user_agent IS 'User-Agent header from the API request';