2
0

0010_snapshot.json 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132
  1. {
  2. "id": "84458c64-5549-40c5-a785-9dfef840b2a2",
  3. "prevId": "eb5fc628-9ee3-43dd-9b4f-7c9eaeee1b82",
  4. "version": "7",
  5. "dialect": "postgresql",
  6. "tables": {
  7. "public.keys": {
  8. "name": "keys",
  9. "schema": "",
  10. "columns": {
  11. "id": {
  12. "name": "id",
  13. "type": "serial",
  14. "primaryKey": true,
  15. "notNull": true
  16. },
  17. "user_id": {
  18. "name": "user_id",
  19. "type": "integer",
  20. "primaryKey": false,
  21. "notNull": true
  22. },
  23. "key": {
  24. "name": "key",
  25. "type": "varchar",
  26. "primaryKey": false,
  27. "notNull": true
  28. },
  29. "name": {
  30. "name": "name",
  31. "type": "varchar",
  32. "primaryKey": false,
  33. "notNull": true
  34. },
  35. "is_enabled": {
  36. "name": "is_enabled",
  37. "type": "boolean",
  38. "primaryKey": false,
  39. "notNull": false,
  40. "default": true
  41. },
  42. "expires_at": {
  43. "name": "expires_at",
  44. "type": "timestamp",
  45. "primaryKey": false,
  46. "notNull": false
  47. },
  48. "can_login_web_ui": {
  49. "name": "can_login_web_ui",
  50. "type": "boolean",
  51. "primaryKey": false,
  52. "notNull": false,
  53. "default": true
  54. },
  55. "limit_5h_usd": {
  56. "name": "limit_5h_usd",
  57. "type": "numeric(10, 2)",
  58. "primaryKey": false,
  59. "notNull": false
  60. },
  61. "limit_weekly_usd": {
  62. "name": "limit_weekly_usd",
  63. "type": "numeric(10, 2)",
  64. "primaryKey": false,
  65. "notNull": false
  66. },
  67. "limit_monthly_usd": {
  68. "name": "limit_monthly_usd",
  69. "type": "numeric(10, 2)",
  70. "primaryKey": false,
  71. "notNull": false
  72. },
  73. "limit_concurrent_sessions": {
  74. "name": "limit_concurrent_sessions",
  75. "type": "integer",
  76. "primaryKey": false,
  77. "notNull": false,
  78. "default": 0
  79. },
  80. "created_at": {
  81. "name": "created_at",
  82. "type": "timestamp with time zone",
  83. "primaryKey": false,
  84. "notNull": false,
  85. "default": "now()"
  86. },
  87. "updated_at": {
  88. "name": "updated_at",
  89. "type": "timestamp with time zone",
  90. "primaryKey": false,
  91. "notNull": false,
  92. "default": "now()"
  93. },
  94. "deleted_at": {
  95. "name": "deleted_at",
  96. "type": "timestamp with time zone",
  97. "primaryKey": false,
  98. "notNull": false
  99. }
  100. },
  101. "indexes": {
  102. "idx_keys_user_id": {
  103. "name": "idx_keys_user_id",
  104. "columns": [
  105. {
  106. "expression": "user_id",
  107. "isExpression": false,
  108. "asc": true,
  109. "nulls": "last"
  110. }
  111. ],
  112. "isUnique": false,
  113. "concurrently": false,
  114. "method": "btree",
  115. "with": {}
  116. },
  117. "idx_keys_created_at": {
  118. "name": "idx_keys_created_at",
  119. "columns": [
  120. {
  121. "expression": "created_at",
  122. "isExpression": false,
  123. "asc": true,
  124. "nulls": "last"
  125. }
  126. ],
  127. "isUnique": false,
  128. "concurrently": false,
  129. "method": "btree",
  130. "with": {}
  131. },
  132. "idx_keys_deleted_at": {
  133. "name": "idx_keys_deleted_at",
  134. "columns": [
  135. {
  136. "expression": "deleted_at",
  137. "isExpression": false,
  138. "asc": true,
  139. "nulls": "last"
  140. }
  141. ],
  142. "isUnique": false,
  143. "concurrently": false,
  144. "method": "btree",
  145. "with": {}
  146. }
  147. },
  148. "foreignKeys": {},
  149. "compositePrimaryKeys": {},
  150. "uniqueConstraints": {},
  151. "policies": {},
  152. "checkConstraints": {},
  153. "isRLSEnabled": false
  154. },
  155. "public.message_request": {
  156. "name": "message_request",
  157. "schema": "",
  158. "columns": {
  159. "id": {
  160. "name": "id",
  161. "type": "serial",
  162. "primaryKey": true,
  163. "notNull": true
  164. },
  165. "provider_id": {
  166. "name": "provider_id",
  167. "type": "integer",
  168. "primaryKey": false,
  169. "notNull": true
  170. },
  171. "user_id": {
  172. "name": "user_id",
  173. "type": "integer",
  174. "primaryKey": false,
  175. "notNull": true
  176. },
  177. "key": {
  178. "name": "key",
  179. "type": "varchar",
  180. "primaryKey": false,
  181. "notNull": true
  182. },
  183. "model": {
  184. "name": "model",
  185. "type": "varchar(128)",
  186. "primaryKey": false,
  187. "notNull": false
  188. },
  189. "duration_ms": {
  190. "name": "duration_ms",
  191. "type": "integer",
  192. "primaryKey": false,
  193. "notNull": false
  194. },
  195. "cost_usd": {
  196. "name": "cost_usd",
  197. "type": "numeric(21, 15)",
  198. "primaryKey": false,
  199. "notNull": false,
  200. "default": "'0'"
  201. },
  202. "cost_multiplier": {
  203. "name": "cost_multiplier",
  204. "type": "numeric(10, 4)",
  205. "primaryKey": false,
  206. "notNull": false
  207. },
  208. "session_id": {
  209. "name": "session_id",
  210. "type": "varchar(64)",
  211. "primaryKey": false,
  212. "notNull": false
  213. },
  214. "provider_chain": {
  215. "name": "provider_chain",
  216. "type": "jsonb",
  217. "primaryKey": false,
  218. "notNull": false
  219. },
  220. "status_code": {
  221. "name": "status_code",
  222. "type": "integer",
  223. "primaryKey": false,
  224. "notNull": false
  225. },
  226. "api_type": {
  227. "name": "api_type",
  228. "type": "varchar(20)",
  229. "primaryKey": false,
  230. "notNull": false
  231. },
  232. "original_model": {
  233. "name": "original_model",
  234. "type": "varchar(128)",
  235. "primaryKey": false,
  236. "notNull": false
  237. },
  238. "input_tokens": {
  239. "name": "input_tokens",
  240. "type": "integer",
  241. "primaryKey": false,
  242. "notNull": false
  243. },
  244. "output_tokens": {
  245. "name": "output_tokens",
  246. "type": "integer",
  247. "primaryKey": false,
  248. "notNull": false
  249. },
  250. "cache_creation_input_tokens": {
  251. "name": "cache_creation_input_tokens",
  252. "type": "integer",
  253. "primaryKey": false,
  254. "notNull": false
  255. },
  256. "cache_read_input_tokens": {
  257. "name": "cache_read_input_tokens",
  258. "type": "integer",
  259. "primaryKey": false,
  260. "notNull": false
  261. },
  262. "error_message": {
  263. "name": "error_message",
  264. "type": "text",
  265. "primaryKey": false,
  266. "notNull": false
  267. },
  268. "blocked_by": {
  269. "name": "blocked_by",
  270. "type": "varchar(50)",
  271. "primaryKey": false,
  272. "notNull": false
  273. },
  274. "blocked_reason": {
  275. "name": "blocked_reason",
  276. "type": "text",
  277. "primaryKey": false,
  278. "notNull": false
  279. },
  280. "user_agent": {
  281. "name": "user_agent",
  282. "type": "varchar(512)",
  283. "primaryKey": false,
  284. "notNull": false
  285. },
  286. "messages_count": {
  287. "name": "messages_count",
  288. "type": "integer",
  289. "primaryKey": false,
  290. "notNull": false
  291. },
  292. "created_at": {
  293. "name": "created_at",
  294. "type": "timestamp with time zone",
  295. "primaryKey": false,
  296. "notNull": false,
  297. "default": "now()"
  298. },
  299. "updated_at": {
  300. "name": "updated_at",
  301. "type": "timestamp with time zone",
  302. "primaryKey": false,
  303. "notNull": false,
  304. "default": "now()"
  305. },
  306. "deleted_at": {
  307. "name": "deleted_at",
  308. "type": "timestamp with time zone",
  309. "primaryKey": false,
  310. "notNull": false
  311. }
  312. },
  313. "indexes": {
  314. "idx_message_request_user_date_cost": {
  315. "name": "idx_message_request_user_date_cost",
  316. "columns": [
  317. {
  318. "expression": "user_id",
  319. "isExpression": false,
  320. "asc": true,
  321. "nulls": "last"
  322. },
  323. {
  324. "expression": "created_at",
  325. "isExpression": false,
  326. "asc": true,
  327. "nulls": "last"
  328. },
  329. {
  330. "expression": "cost_usd",
  331. "isExpression": false,
  332. "asc": true,
  333. "nulls": "last"
  334. }
  335. ],
  336. "isUnique": false,
  337. "where": "\"message_request\".\"deleted_at\" IS NULL",
  338. "concurrently": false,
  339. "method": "btree",
  340. "with": {}
  341. },
  342. "idx_message_request_user_query": {
  343. "name": "idx_message_request_user_query",
  344. "columns": [
  345. {
  346. "expression": "user_id",
  347. "isExpression": false,
  348. "asc": true,
  349. "nulls": "last"
  350. },
  351. {
  352. "expression": "created_at",
  353. "isExpression": false,
  354. "asc": true,
  355. "nulls": "last"
  356. }
  357. ],
  358. "isUnique": false,
  359. "where": "\"message_request\".\"deleted_at\" IS NULL",
  360. "concurrently": false,
  361. "method": "btree",
  362. "with": {}
  363. },
  364. "idx_message_request_session_id": {
  365. "name": "idx_message_request_session_id",
  366. "columns": [
  367. {
  368. "expression": "session_id",
  369. "isExpression": false,
  370. "asc": true,
  371. "nulls": "last"
  372. }
  373. ],
  374. "isUnique": false,
  375. "where": "\"message_request\".\"deleted_at\" IS NULL",
  376. "concurrently": false,
  377. "method": "btree",
  378. "with": {}
  379. },
  380. "idx_message_request_provider_id": {
  381. "name": "idx_message_request_provider_id",
  382. "columns": [
  383. {
  384. "expression": "provider_id",
  385. "isExpression": false,
  386. "asc": true,
  387. "nulls": "last"
  388. }
  389. ],
  390. "isUnique": false,
  391. "concurrently": false,
  392. "method": "btree",
  393. "with": {}
  394. },
  395. "idx_message_request_user_id": {
  396. "name": "idx_message_request_user_id",
  397. "columns": [
  398. {
  399. "expression": "user_id",
  400. "isExpression": false,
  401. "asc": true,
  402. "nulls": "last"
  403. }
  404. ],
  405. "isUnique": false,
  406. "concurrently": false,
  407. "method": "btree",
  408. "with": {}
  409. },
  410. "idx_message_request_key": {
  411. "name": "idx_message_request_key",
  412. "columns": [
  413. {
  414. "expression": "key",
  415. "isExpression": false,
  416. "asc": true,
  417. "nulls": "last"
  418. }
  419. ],
  420. "isUnique": false,
  421. "concurrently": false,
  422. "method": "btree",
  423. "with": {}
  424. },
  425. "idx_message_request_created_at": {
  426. "name": "idx_message_request_created_at",
  427. "columns": [
  428. {
  429. "expression": "created_at",
  430. "isExpression": false,
  431. "asc": true,
  432. "nulls": "last"
  433. }
  434. ],
  435. "isUnique": false,
  436. "concurrently": false,
  437. "method": "btree",
  438. "with": {}
  439. },
  440. "idx_message_request_deleted_at": {
  441. "name": "idx_message_request_deleted_at",
  442. "columns": [
  443. {
  444. "expression": "deleted_at",
  445. "isExpression": false,
  446. "asc": true,
  447. "nulls": "last"
  448. }
  449. ],
  450. "isUnique": false,
  451. "concurrently": false,
  452. "method": "btree",
  453. "with": {}
  454. }
  455. },
  456. "foreignKeys": {},
  457. "compositePrimaryKeys": {},
  458. "uniqueConstraints": {},
  459. "policies": {},
  460. "checkConstraints": {},
  461. "isRLSEnabled": false
  462. },
  463. "public.model_prices": {
  464. "name": "model_prices",
  465. "schema": "",
  466. "columns": {
  467. "id": {
  468. "name": "id",
  469. "type": "serial",
  470. "primaryKey": true,
  471. "notNull": true
  472. },
  473. "model_name": {
  474. "name": "model_name",
  475. "type": "varchar",
  476. "primaryKey": false,
  477. "notNull": true
  478. },
  479. "price_data": {
  480. "name": "price_data",
  481. "type": "jsonb",
  482. "primaryKey": false,
  483. "notNull": true
  484. },
  485. "created_at": {
  486. "name": "created_at",
  487. "type": "timestamp with time zone",
  488. "primaryKey": false,
  489. "notNull": false,
  490. "default": "now()"
  491. },
  492. "updated_at": {
  493. "name": "updated_at",
  494. "type": "timestamp with time zone",
  495. "primaryKey": false,
  496. "notNull": false,
  497. "default": "now()"
  498. }
  499. },
  500. "indexes": {
  501. "idx_model_prices_latest": {
  502. "name": "idx_model_prices_latest",
  503. "columns": [
  504. {
  505. "expression": "model_name",
  506. "isExpression": false,
  507. "asc": true,
  508. "nulls": "last"
  509. },
  510. {
  511. "expression": "created_at",
  512. "isExpression": false,
  513. "asc": false,
  514. "nulls": "last"
  515. }
  516. ],
  517. "isUnique": false,
  518. "concurrently": false,
  519. "method": "btree",
  520. "with": {}
  521. },
  522. "idx_model_prices_model_name": {
  523. "name": "idx_model_prices_model_name",
  524. "columns": [
  525. {
  526. "expression": "model_name",
  527. "isExpression": false,
  528. "asc": true,
  529. "nulls": "last"
  530. }
  531. ],
  532. "isUnique": false,
  533. "concurrently": false,
  534. "method": "btree",
  535. "with": {}
  536. },
  537. "idx_model_prices_created_at": {
  538. "name": "idx_model_prices_created_at",
  539. "columns": [
  540. {
  541. "expression": "created_at",
  542. "isExpression": false,
  543. "asc": false,
  544. "nulls": "last"
  545. }
  546. ],
  547. "isUnique": false,
  548. "concurrently": false,
  549. "method": "btree",
  550. "with": {}
  551. }
  552. },
  553. "foreignKeys": {},
  554. "compositePrimaryKeys": {},
  555. "uniqueConstraints": {},
  556. "policies": {},
  557. "checkConstraints": {},
  558. "isRLSEnabled": false
  559. },
  560. "public.providers": {
  561. "name": "providers",
  562. "schema": "",
  563. "columns": {
  564. "id": {
  565. "name": "id",
  566. "type": "serial",
  567. "primaryKey": true,
  568. "notNull": true
  569. },
  570. "name": {
  571. "name": "name",
  572. "type": "varchar",
  573. "primaryKey": false,
  574. "notNull": true
  575. },
  576. "description": {
  577. "name": "description",
  578. "type": "text",
  579. "primaryKey": false,
  580. "notNull": false
  581. },
  582. "url": {
  583. "name": "url",
  584. "type": "varchar",
  585. "primaryKey": false,
  586. "notNull": true
  587. },
  588. "key": {
  589. "name": "key",
  590. "type": "varchar",
  591. "primaryKey": false,
  592. "notNull": true
  593. },
  594. "is_enabled": {
  595. "name": "is_enabled",
  596. "type": "boolean",
  597. "primaryKey": false,
  598. "notNull": true,
  599. "default": true
  600. },
  601. "weight": {
  602. "name": "weight",
  603. "type": "integer",
  604. "primaryKey": false,
  605. "notNull": true,
  606. "default": 1
  607. },
  608. "priority": {
  609. "name": "priority",
  610. "type": "integer",
  611. "primaryKey": false,
  612. "notNull": true,
  613. "default": 0
  614. },
  615. "cost_multiplier": {
  616. "name": "cost_multiplier",
  617. "type": "numeric(10, 4)",
  618. "primaryKey": false,
  619. "notNull": false,
  620. "default": "'1.0'"
  621. },
  622. "group_tag": {
  623. "name": "group_tag",
  624. "type": "varchar(50)",
  625. "primaryKey": false,
  626. "notNull": false
  627. },
  628. "provider_type": {
  629. "name": "provider_type",
  630. "type": "varchar(20)",
  631. "primaryKey": false,
  632. "notNull": true,
  633. "default": "'claude'"
  634. },
  635. "model_redirects": {
  636. "name": "model_redirects",
  637. "type": "jsonb",
  638. "primaryKey": false,
  639. "notNull": false
  640. },
  641. "allowed_models": {
  642. "name": "allowed_models",
  643. "type": "jsonb",
  644. "primaryKey": false,
  645. "notNull": false,
  646. "default": "'null'::jsonb"
  647. },
  648. "limit_5h_usd": {
  649. "name": "limit_5h_usd",
  650. "type": "numeric(10, 2)",
  651. "primaryKey": false,
  652. "notNull": false
  653. },
  654. "limit_weekly_usd": {
  655. "name": "limit_weekly_usd",
  656. "type": "numeric(10, 2)",
  657. "primaryKey": false,
  658. "notNull": false
  659. },
  660. "limit_monthly_usd": {
  661. "name": "limit_monthly_usd",
  662. "type": "numeric(10, 2)",
  663. "primaryKey": false,
  664. "notNull": false
  665. },
  666. "limit_concurrent_sessions": {
  667. "name": "limit_concurrent_sessions",
  668. "type": "integer",
  669. "primaryKey": false,
  670. "notNull": false,
  671. "default": 0
  672. },
  673. "tpm": {
  674. "name": "tpm",
  675. "type": "integer",
  676. "primaryKey": false,
  677. "notNull": false,
  678. "default": 0
  679. },
  680. "rpm": {
  681. "name": "rpm",
  682. "type": "integer",
  683. "primaryKey": false,
  684. "notNull": false,
  685. "default": 0
  686. },
  687. "rpd": {
  688. "name": "rpd",
  689. "type": "integer",
  690. "primaryKey": false,
  691. "notNull": false,
  692. "default": 0
  693. },
  694. "cc": {
  695. "name": "cc",
  696. "type": "integer",
  697. "primaryKey": false,
  698. "notNull": false,
  699. "default": 0
  700. },
  701. "created_at": {
  702. "name": "created_at",
  703. "type": "timestamp with time zone",
  704. "primaryKey": false,
  705. "notNull": false,
  706. "default": "now()"
  707. },
  708. "updated_at": {
  709. "name": "updated_at",
  710. "type": "timestamp with time zone",
  711. "primaryKey": false,
  712. "notNull": false,
  713. "default": "now()"
  714. },
  715. "deleted_at": {
  716. "name": "deleted_at",
  717. "type": "timestamp with time zone",
  718. "primaryKey": false,
  719. "notNull": false
  720. }
  721. },
  722. "indexes": {
  723. "idx_providers_enabled_priority": {
  724. "name": "idx_providers_enabled_priority",
  725. "columns": [
  726. {
  727. "expression": "is_enabled",
  728. "isExpression": false,
  729. "asc": true,
  730. "nulls": "last"
  731. },
  732. {
  733. "expression": "priority",
  734. "isExpression": false,
  735. "asc": true,
  736. "nulls": "last"
  737. },
  738. {
  739. "expression": "weight",
  740. "isExpression": false,
  741. "asc": true,
  742. "nulls": "last"
  743. }
  744. ],
  745. "isUnique": false,
  746. "where": "\"providers\".\"deleted_at\" IS NULL",
  747. "concurrently": false,
  748. "method": "btree",
  749. "with": {}
  750. },
  751. "idx_providers_group": {
  752. "name": "idx_providers_group",
  753. "columns": [
  754. {
  755. "expression": "group_tag",
  756. "isExpression": false,
  757. "asc": true,
  758. "nulls": "last"
  759. }
  760. ],
  761. "isUnique": false,
  762. "where": "\"providers\".\"deleted_at\" IS NULL",
  763. "concurrently": false,
  764. "method": "btree",
  765. "with": {}
  766. },
  767. "idx_providers_created_at": {
  768. "name": "idx_providers_created_at",
  769. "columns": [
  770. {
  771. "expression": "created_at",
  772. "isExpression": false,
  773. "asc": true,
  774. "nulls": "last"
  775. }
  776. ],
  777. "isUnique": false,
  778. "concurrently": false,
  779. "method": "btree",
  780. "with": {}
  781. },
  782. "idx_providers_deleted_at": {
  783. "name": "idx_providers_deleted_at",
  784. "columns": [
  785. {
  786. "expression": "deleted_at",
  787. "isExpression": false,
  788. "asc": true,
  789. "nulls": "last"
  790. }
  791. ],
  792. "isUnique": false,
  793. "concurrently": false,
  794. "method": "btree",
  795. "with": {}
  796. }
  797. },
  798. "foreignKeys": {},
  799. "compositePrimaryKeys": {},
  800. "uniqueConstraints": {},
  801. "policies": {},
  802. "checkConstraints": {},
  803. "isRLSEnabled": false
  804. },
  805. "public.sensitive_words": {
  806. "name": "sensitive_words",
  807. "schema": "",
  808. "columns": {
  809. "id": {
  810. "name": "id",
  811. "type": "serial",
  812. "primaryKey": true,
  813. "notNull": true
  814. },
  815. "word": {
  816. "name": "word",
  817. "type": "varchar(255)",
  818. "primaryKey": false,
  819. "notNull": true
  820. },
  821. "match_type": {
  822. "name": "match_type",
  823. "type": "varchar(20)",
  824. "primaryKey": false,
  825. "notNull": true,
  826. "default": "'contains'"
  827. },
  828. "description": {
  829. "name": "description",
  830. "type": "text",
  831. "primaryKey": false,
  832. "notNull": false
  833. },
  834. "is_enabled": {
  835. "name": "is_enabled",
  836. "type": "boolean",
  837. "primaryKey": false,
  838. "notNull": true,
  839. "default": true
  840. },
  841. "created_at": {
  842. "name": "created_at",
  843. "type": "timestamp with time zone",
  844. "primaryKey": false,
  845. "notNull": false,
  846. "default": "now()"
  847. },
  848. "updated_at": {
  849. "name": "updated_at",
  850. "type": "timestamp with time zone",
  851. "primaryKey": false,
  852. "notNull": false,
  853. "default": "now()"
  854. }
  855. },
  856. "indexes": {
  857. "idx_sensitive_words_enabled": {
  858. "name": "idx_sensitive_words_enabled",
  859. "columns": [
  860. {
  861. "expression": "is_enabled",
  862. "isExpression": false,
  863. "asc": true,
  864. "nulls": "last"
  865. },
  866. {
  867. "expression": "match_type",
  868. "isExpression": false,
  869. "asc": true,
  870. "nulls": "last"
  871. }
  872. ],
  873. "isUnique": false,
  874. "concurrently": false,
  875. "method": "btree",
  876. "with": {}
  877. },
  878. "idx_sensitive_words_created_at": {
  879. "name": "idx_sensitive_words_created_at",
  880. "columns": [
  881. {
  882. "expression": "created_at",
  883. "isExpression": false,
  884. "asc": true,
  885. "nulls": "last"
  886. }
  887. ],
  888. "isUnique": false,
  889. "concurrently": false,
  890. "method": "btree",
  891. "with": {}
  892. }
  893. },
  894. "foreignKeys": {},
  895. "compositePrimaryKeys": {},
  896. "uniqueConstraints": {},
  897. "policies": {},
  898. "checkConstraints": {},
  899. "isRLSEnabled": false
  900. },
  901. "public.system_settings": {
  902. "name": "system_settings",
  903. "schema": "",
  904. "columns": {
  905. "id": {
  906. "name": "id",
  907. "type": "serial",
  908. "primaryKey": true,
  909. "notNull": true
  910. },
  911. "site_title": {
  912. "name": "site_title",
  913. "type": "varchar(128)",
  914. "primaryKey": false,
  915. "notNull": true,
  916. "default": "'Claude Code Hub'"
  917. },
  918. "allow_global_usage_view": {
  919. "name": "allow_global_usage_view",
  920. "type": "boolean",
  921. "primaryKey": false,
  922. "notNull": true,
  923. "default": false
  924. },
  925. "currency_display": {
  926. "name": "currency_display",
  927. "type": "varchar(10)",
  928. "primaryKey": false,
  929. "notNull": true,
  930. "default": "'USD'"
  931. },
  932. "enable_auto_cleanup": {
  933. "name": "enable_auto_cleanup",
  934. "type": "boolean",
  935. "primaryKey": false,
  936. "notNull": false,
  937. "default": false
  938. },
  939. "cleanup_retention_days": {
  940. "name": "cleanup_retention_days",
  941. "type": "integer",
  942. "primaryKey": false,
  943. "notNull": false,
  944. "default": 30
  945. },
  946. "cleanup_schedule": {
  947. "name": "cleanup_schedule",
  948. "type": "varchar(50)",
  949. "primaryKey": false,
  950. "notNull": false,
  951. "default": "'0 2 * * *'"
  952. },
  953. "cleanup_batch_size": {
  954. "name": "cleanup_batch_size",
  955. "type": "integer",
  956. "primaryKey": false,
  957. "notNull": false,
  958. "default": 10000
  959. },
  960. "created_at": {
  961. "name": "created_at",
  962. "type": "timestamp with time zone",
  963. "primaryKey": false,
  964. "notNull": false,
  965. "default": "now()"
  966. },
  967. "updated_at": {
  968. "name": "updated_at",
  969. "type": "timestamp with time zone",
  970. "primaryKey": false,
  971. "notNull": false,
  972. "default": "now()"
  973. }
  974. },
  975. "indexes": {},
  976. "foreignKeys": {},
  977. "compositePrimaryKeys": {},
  978. "uniqueConstraints": {},
  979. "policies": {},
  980. "checkConstraints": {},
  981. "isRLSEnabled": false
  982. },
  983. "public.users": {
  984. "name": "users",
  985. "schema": "",
  986. "columns": {
  987. "id": {
  988. "name": "id",
  989. "type": "serial",
  990. "primaryKey": true,
  991. "notNull": true
  992. },
  993. "name": {
  994. "name": "name",
  995. "type": "varchar",
  996. "primaryKey": false,
  997. "notNull": true
  998. },
  999. "description": {
  1000. "name": "description",
  1001. "type": "text",
  1002. "primaryKey": false,
  1003. "notNull": false
  1004. },
  1005. "role": {
  1006. "name": "role",
  1007. "type": "varchar",
  1008. "primaryKey": false,
  1009. "notNull": false,
  1010. "default": "'user'"
  1011. },
  1012. "rpm_limit": {
  1013. "name": "rpm_limit",
  1014. "type": "integer",
  1015. "primaryKey": false,
  1016. "notNull": false,
  1017. "default": 60
  1018. },
  1019. "daily_limit_usd": {
  1020. "name": "daily_limit_usd",
  1021. "type": "numeric(10, 2)",
  1022. "primaryKey": false,
  1023. "notNull": false,
  1024. "default": "'100.00'"
  1025. },
  1026. "provider_group": {
  1027. "name": "provider_group",
  1028. "type": "varchar(50)",
  1029. "primaryKey": false,
  1030. "notNull": false
  1031. },
  1032. "created_at": {
  1033. "name": "created_at",
  1034. "type": "timestamp with time zone",
  1035. "primaryKey": false,
  1036. "notNull": false,
  1037. "default": "now()"
  1038. },
  1039. "updated_at": {
  1040. "name": "updated_at",
  1041. "type": "timestamp with time zone",
  1042. "primaryKey": false,
  1043. "notNull": false,
  1044. "default": "now()"
  1045. },
  1046. "deleted_at": {
  1047. "name": "deleted_at",
  1048. "type": "timestamp with time zone",
  1049. "primaryKey": false,
  1050. "notNull": false
  1051. }
  1052. },
  1053. "indexes": {
  1054. "idx_users_active_role_sort": {
  1055. "name": "idx_users_active_role_sort",
  1056. "columns": [
  1057. {
  1058. "expression": "deleted_at",
  1059. "isExpression": false,
  1060. "asc": true,
  1061. "nulls": "last"
  1062. },
  1063. {
  1064. "expression": "role",
  1065. "isExpression": false,
  1066. "asc": true,
  1067. "nulls": "last"
  1068. },
  1069. {
  1070. "expression": "id",
  1071. "isExpression": false,
  1072. "asc": true,
  1073. "nulls": "last"
  1074. }
  1075. ],
  1076. "isUnique": false,
  1077. "where": "\"users\".\"deleted_at\" IS NULL",
  1078. "concurrently": false,
  1079. "method": "btree",
  1080. "with": {}
  1081. },
  1082. "idx_users_created_at": {
  1083. "name": "idx_users_created_at",
  1084. "columns": [
  1085. {
  1086. "expression": "created_at",
  1087. "isExpression": false,
  1088. "asc": true,
  1089. "nulls": "last"
  1090. }
  1091. ],
  1092. "isUnique": false,
  1093. "concurrently": false,
  1094. "method": "btree",
  1095. "with": {}
  1096. },
  1097. "idx_users_deleted_at": {
  1098. "name": "idx_users_deleted_at",
  1099. "columns": [
  1100. {
  1101. "expression": "deleted_at",
  1102. "isExpression": false,
  1103. "asc": true,
  1104. "nulls": "last"
  1105. }
  1106. ],
  1107. "isUnique": false,
  1108. "concurrently": false,
  1109. "method": "btree",
  1110. "with": {}
  1111. }
  1112. },
  1113. "foreignKeys": {},
  1114. "compositePrimaryKeys": {},
  1115. "uniqueConstraints": {},
  1116. "policies": {},
  1117. "checkConstraints": {},
  1118. "isRLSEnabled": false
  1119. }
  1120. },
  1121. "enums": {},
  1122. "schemas": {},
  1123. "sequences": {},
  1124. "roles": {},
  1125. "policies": {},
  1126. "views": {},
  1127. "_meta": {
  1128. "columns": {},
  1129. "schemas": {},
  1130. "tables": {}
  1131. }
  1132. }