0012_snapshot.json 30 KB

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