0008_snapshot.json 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090
  1. {
  2. "id": "698b8828-974b-4a0c-a986-da8003b446ab",
  3. "prevId": "057f72f8-a903-4f53-a4a2-0a927fa0fb8e",
  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. "limit_5h_usd": {
  642. "name": "limit_5h_usd",
  643. "type": "numeric(10, 2)",
  644. "primaryKey": false,
  645. "notNull": false
  646. },
  647. "limit_weekly_usd": {
  648. "name": "limit_weekly_usd",
  649. "type": "numeric(10, 2)",
  650. "primaryKey": false,
  651. "notNull": false
  652. },
  653. "limit_monthly_usd": {
  654. "name": "limit_monthly_usd",
  655. "type": "numeric(10, 2)",
  656. "primaryKey": false,
  657. "notNull": false
  658. },
  659. "limit_concurrent_sessions": {
  660. "name": "limit_concurrent_sessions",
  661. "type": "integer",
  662. "primaryKey": false,
  663. "notNull": false,
  664. "default": 0
  665. },
  666. "tpm": {
  667. "name": "tpm",
  668. "type": "integer",
  669. "primaryKey": false,
  670. "notNull": false,
  671. "default": 0
  672. },
  673. "rpm": {
  674. "name": "rpm",
  675. "type": "integer",
  676. "primaryKey": false,
  677. "notNull": false,
  678. "default": 0
  679. },
  680. "rpd": {
  681. "name": "rpd",
  682. "type": "integer",
  683. "primaryKey": false,
  684. "notNull": false,
  685. "default": 0
  686. },
  687. "cc": {
  688. "name": "cc",
  689. "type": "integer",
  690. "primaryKey": false,
  691. "notNull": false,
  692. "default": 0
  693. },
  694. "created_at": {
  695. "name": "created_at",
  696. "type": "timestamp with time zone",
  697. "primaryKey": false,
  698. "notNull": false,
  699. "default": "now()"
  700. },
  701. "updated_at": {
  702. "name": "updated_at",
  703. "type": "timestamp with time zone",
  704. "primaryKey": false,
  705. "notNull": false,
  706. "default": "now()"
  707. },
  708. "deleted_at": {
  709. "name": "deleted_at",
  710. "type": "timestamp with time zone",
  711. "primaryKey": false,
  712. "notNull": false
  713. }
  714. },
  715. "indexes": {
  716. "idx_providers_enabled_priority": {
  717. "name": "idx_providers_enabled_priority",
  718. "columns": [
  719. {
  720. "expression": "is_enabled",
  721. "isExpression": false,
  722. "asc": true,
  723. "nulls": "last"
  724. },
  725. {
  726. "expression": "priority",
  727. "isExpression": false,
  728. "asc": true,
  729. "nulls": "last"
  730. },
  731. {
  732. "expression": "weight",
  733. "isExpression": false,
  734. "asc": true,
  735. "nulls": "last"
  736. }
  737. ],
  738. "isUnique": false,
  739. "where": "\"providers\".\"deleted_at\" IS NULL",
  740. "concurrently": false,
  741. "method": "btree",
  742. "with": {}
  743. },
  744. "idx_providers_group": {
  745. "name": "idx_providers_group",
  746. "columns": [
  747. {
  748. "expression": "group_tag",
  749. "isExpression": false,
  750. "asc": true,
  751. "nulls": "last"
  752. }
  753. ],
  754. "isUnique": false,
  755. "where": "\"providers\".\"deleted_at\" IS NULL",
  756. "concurrently": false,
  757. "method": "btree",
  758. "with": {}
  759. },
  760. "idx_providers_created_at": {
  761. "name": "idx_providers_created_at",
  762. "columns": [
  763. {
  764. "expression": "created_at",
  765. "isExpression": false,
  766. "asc": true,
  767. "nulls": "last"
  768. }
  769. ],
  770. "isUnique": false,
  771. "concurrently": false,
  772. "method": "btree",
  773. "with": {}
  774. },
  775. "idx_providers_deleted_at": {
  776. "name": "idx_providers_deleted_at",
  777. "columns": [
  778. {
  779. "expression": "deleted_at",
  780. "isExpression": false,
  781. "asc": true,
  782. "nulls": "last"
  783. }
  784. ],
  785. "isUnique": false,
  786. "concurrently": false,
  787. "method": "btree",
  788. "with": {}
  789. }
  790. },
  791. "foreignKeys": {},
  792. "compositePrimaryKeys": {},
  793. "uniqueConstraints": {},
  794. "policies": {},
  795. "checkConstraints": {},
  796. "isRLSEnabled": false
  797. },
  798. "public.sensitive_words": {
  799. "name": "sensitive_words",
  800. "schema": "",
  801. "columns": {
  802. "id": {
  803. "name": "id",
  804. "type": "serial",
  805. "primaryKey": true,
  806. "notNull": true
  807. },
  808. "word": {
  809. "name": "word",
  810. "type": "varchar(255)",
  811. "primaryKey": false,
  812. "notNull": true
  813. },
  814. "match_type": {
  815. "name": "match_type",
  816. "type": "varchar(20)",
  817. "primaryKey": false,
  818. "notNull": true,
  819. "default": "'contains'"
  820. },
  821. "description": {
  822. "name": "description",
  823. "type": "text",
  824. "primaryKey": false,
  825. "notNull": false
  826. },
  827. "is_enabled": {
  828. "name": "is_enabled",
  829. "type": "boolean",
  830. "primaryKey": false,
  831. "notNull": true,
  832. "default": true
  833. },
  834. "created_at": {
  835. "name": "created_at",
  836. "type": "timestamp with time zone",
  837. "primaryKey": false,
  838. "notNull": false,
  839. "default": "now()"
  840. },
  841. "updated_at": {
  842. "name": "updated_at",
  843. "type": "timestamp with time zone",
  844. "primaryKey": false,
  845. "notNull": false,
  846. "default": "now()"
  847. }
  848. },
  849. "indexes": {
  850. "idx_sensitive_words_enabled": {
  851. "name": "idx_sensitive_words_enabled",
  852. "columns": [
  853. {
  854. "expression": "is_enabled",
  855. "isExpression": false,
  856. "asc": true,
  857. "nulls": "last"
  858. },
  859. {
  860. "expression": "match_type",
  861. "isExpression": false,
  862. "asc": true,
  863. "nulls": "last"
  864. }
  865. ],
  866. "isUnique": false,
  867. "concurrently": false,
  868. "method": "btree",
  869. "with": {}
  870. },
  871. "idx_sensitive_words_created_at": {
  872. "name": "idx_sensitive_words_created_at",
  873. "columns": [
  874. {
  875. "expression": "created_at",
  876. "isExpression": false,
  877. "asc": true,
  878. "nulls": "last"
  879. }
  880. ],
  881. "isUnique": false,
  882. "concurrently": false,
  883. "method": "btree",
  884. "with": {}
  885. }
  886. },
  887. "foreignKeys": {},
  888. "compositePrimaryKeys": {},
  889. "uniqueConstraints": {},
  890. "policies": {},
  891. "checkConstraints": {},
  892. "isRLSEnabled": false
  893. },
  894. "public.system_settings": {
  895. "name": "system_settings",
  896. "schema": "",
  897. "columns": {
  898. "id": {
  899. "name": "id",
  900. "type": "serial",
  901. "primaryKey": true,
  902. "notNull": true
  903. },
  904. "site_title": {
  905. "name": "site_title",
  906. "type": "varchar(128)",
  907. "primaryKey": false,
  908. "notNull": true,
  909. "default": "'Claude Code Hub'"
  910. },
  911. "allow_global_usage_view": {
  912. "name": "allow_global_usage_view",
  913. "type": "boolean",
  914. "primaryKey": false,
  915. "notNull": true,
  916. "default": false
  917. },
  918. "created_at": {
  919. "name": "created_at",
  920. "type": "timestamp with time zone",
  921. "primaryKey": false,
  922. "notNull": false,
  923. "default": "now()"
  924. },
  925. "updated_at": {
  926. "name": "updated_at",
  927. "type": "timestamp with time zone",
  928. "primaryKey": false,
  929. "notNull": false,
  930. "default": "now()"
  931. }
  932. },
  933. "indexes": {},
  934. "foreignKeys": {},
  935. "compositePrimaryKeys": {},
  936. "uniqueConstraints": {},
  937. "policies": {},
  938. "checkConstraints": {},
  939. "isRLSEnabled": false
  940. },
  941. "public.users": {
  942. "name": "users",
  943. "schema": "",
  944. "columns": {
  945. "id": {
  946. "name": "id",
  947. "type": "serial",
  948. "primaryKey": true,
  949. "notNull": true
  950. },
  951. "name": {
  952. "name": "name",
  953. "type": "varchar",
  954. "primaryKey": false,
  955. "notNull": true
  956. },
  957. "description": {
  958. "name": "description",
  959. "type": "text",
  960. "primaryKey": false,
  961. "notNull": false
  962. },
  963. "role": {
  964. "name": "role",
  965. "type": "varchar",
  966. "primaryKey": false,
  967. "notNull": false,
  968. "default": "'user'"
  969. },
  970. "rpm_limit": {
  971. "name": "rpm_limit",
  972. "type": "integer",
  973. "primaryKey": false,
  974. "notNull": false,
  975. "default": 60
  976. },
  977. "daily_limit_usd": {
  978. "name": "daily_limit_usd",
  979. "type": "numeric(10, 2)",
  980. "primaryKey": false,
  981. "notNull": false,
  982. "default": "'100.00'"
  983. },
  984. "provider_group": {
  985. "name": "provider_group",
  986. "type": "varchar(50)",
  987. "primaryKey": false,
  988. "notNull": false
  989. },
  990. "created_at": {
  991. "name": "created_at",
  992. "type": "timestamp with time zone",
  993. "primaryKey": false,
  994. "notNull": false,
  995. "default": "now()"
  996. },
  997. "updated_at": {
  998. "name": "updated_at",
  999. "type": "timestamp with time zone",
  1000. "primaryKey": false,
  1001. "notNull": false,
  1002. "default": "now()"
  1003. },
  1004. "deleted_at": {
  1005. "name": "deleted_at",
  1006. "type": "timestamp with time zone",
  1007. "primaryKey": false,
  1008. "notNull": false
  1009. }
  1010. },
  1011. "indexes": {
  1012. "idx_users_active_role_sort": {
  1013. "name": "idx_users_active_role_sort",
  1014. "columns": [
  1015. {
  1016. "expression": "deleted_at",
  1017. "isExpression": false,
  1018. "asc": true,
  1019. "nulls": "last"
  1020. },
  1021. {
  1022. "expression": "role",
  1023. "isExpression": false,
  1024. "asc": true,
  1025. "nulls": "last"
  1026. },
  1027. {
  1028. "expression": "id",
  1029. "isExpression": false,
  1030. "asc": true,
  1031. "nulls": "last"
  1032. }
  1033. ],
  1034. "isUnique": false,
  1035. "where": "\"users\".\"deleted_at\" IS NULL",
  1036. "concurrently": false,
  1037. "method": "btree",
  1038. "with": {}
  1039. },
  1040. "idx_users_created_at": {
  1041. "name": "idx_users_created_at",
  1042. "columns": [
  1043. {
  1044. "expression": "created_at",
  1045. "isExpression": false,
  1046. "asc": true,
  1047. "nulls": "last"
  1048. }
  1049. ],
  1050. "isUnique": false,
  1051. "concurrently": false,
  1052. "method": "btree",
  1053. "with": {}
  1054. },
  1055. "idx_users_deleted_at": {
  1056. "name": "idx_users_deleted_at",
  1057. "columns": [
  1058. {
  1059. "expression": "deleted_at",
  1060. "isExpression": false,
  1061. "asc": true,
  1062. "nulls": "last"
  1063. }
  1064. ],
  1065. "isUnique": false,
  1066. "concurrently": false,
  1067. "method": "btree",
  1068. "with": {}
  1069. }
  1070. },
  1071. "foreignKeys": {},
  1072. "compositePrimaryKeys": {},
  1073. "uniqueConstraints": {},
  1074. "policies": {},
  1075. "checkConstraints": {},
  1076. "isRLSEnabled": false
  1077. }
  1078. },
  1079. "enums": {},
  1080. "schemas": {},
  1081. "sequences": {},
  1082. "roles": {},
  1083. "policies": {},
  1084. "views": {},
  1085. "_meta": {
  1086. "columns": {},
  1087. "schemas": {},
  1088. "tables": {}
  1089. }
  1090. }