Skip to content

Commit f467991

Browse files
committed
docs(db): note limit_notifications dedup is per-account, not per-table
1 parent a7ae72d commit f467991

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

packages/db/schema.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,11 @@ export const userStats = pgTable('user_stats', {
922922
* `{ storage: 80, tables: 100 }`). Prevents re-spamming the same warning;
923923
* re-arms when usage drops back below the re-arm band. Keyed by limit
924924
* category ('storage' | 'tables'); seats live on `organization`.
925+
*
926+
* Dedup granularity is per billing account per category — intentionally NOT
927+
* per table, so a user hitting the row limit on several tables gets one
928+
* 'tables' warning, not one per table (the email still names the table that
929+
* triggered it).
925930
*/
926931
limitNotifications: jsonb('limit_notifications')
927932
.$type<Record<string, number>>()
@@ -3044,7 +3049,7 @@ export const credentialSetInvitation = pgTable(
30443049
*
30453050
* Scope invariant: the organization's single default group (`isDefault`) is
30463051
* org-wide (`appliesToAllWorkspaces = true`) and governs everyone not covered by
3047-
* another group, including external workspace members. Every non-default group
3052+
* another group. Every non-default group
30483053
* targets specific workspaces (`appliesToAllWorkspaces = false` with rows in
30493054
* `permission_group_workspace`) — the all-workspaces scope is reserved for the
30503055
* default group. Enforced by the API contracts/routes, not a DB constraint.

0 commit comments

Comments
 (0)