diff options
| author | Frank <[email protected]> | 2026-04-14 20:29:21 -0400 |
|---|---|---|
| committer | Frank <[email protected]> | 2026-04-14 20:29:21 -0400 |
| commit | 8df7ccc304273f3642f93543a36c955491be8490 (patch) | |
| tree | fc9de0e903558233b27b8c54657a148c7423a650 /packages/console/core/src/schema/ip.sql.ts | |
| parent | 2c36bf9490ef346d48680bc31fce51e90c52f47c (diff) | |
| download | opencode-8df7ccc304273f3642f93543a36c955491be8490.tar.gz opencode-8df7ccc304273f3642f93543a36c955491be8490.zip | |
zen: rate limiter
Diffstat (limited to 'packages/console/core/src/schema/ip.sql.ts')
| -rw-r--r-- | packages/console/core/src/schema/ip.sql.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/console/core/src/schema/ip.sql.ts b/packages/console/core/src/schema/ip.sql.ts index 97e356024..a840a78c1 100644 --- a/packages/console/core/src/schema/ip.sql.ts +++ b/packages/console/core/src/schema/ip.sql.ts @@ -20,3 +20,13 @@ export const IpRateLimitTable = mysqlTable( }, (table) => [primaryKey({ columns: [table.ip, table.interval] })], ) + +export const KeyRateLimitTable = mysqlTable( + "key_rate_limit", + { + key: varchar("key", { length: 255 }).notNull(), + interval: varchar("interval", { length: 40 }).notNull(), + count: int("count").notNull(), + }, + (table) => [primaryKey({ columns: [table.key, table.interval] })], +) |
