database
backend
auth
devops
Introduce hand‑authored domain types and apply DB security/performance hardening
- Hand‑authored domain types added to the database package — Added a new domain-types.ts that contains maintained type aliases and JSONB interfaces separate from the auto‑generated types.ts. This clarifies type usage, prevents conflicts with generated types, and makes domain types available from the package root.
Code organization & types
- Added packages/database/src/domain-types.ts to hold hand‑authored domain type aliases and JSONB interfaces (kept separate from the auto‑generated types.ts).database
- Updated packages/database/src/index.ts to export the new domain types and adjusted existing exports for clarity and maintainability.backend
- Refactored repository files to import domain types from domain-types.ts instead of the auto‑generated types.ts to reduce confusion and accidental overwrites.backend
- Removed domain‑specific type definitions from the auto‑generated types.ts to avoid conflicts and keep generated output clean.database
Database security hardening
- Added a large migration that tightens RLS policies, scopes permissive policies to the service_role, and consolidates overlapping policies to reduce accidental access.database
Database performance improvements
- Improved RLS performance by switching bare auth.jwt() calls to (SELECT auth.jwt()) so PostgreSQL evaluates the JWT once per query instead of per row.database
Public API / exports
- Updated package exports so domain types and Json are available from the package root; downstream consumers can import domain types directly from @suprlogs/database.backend