0006_snapshot.json 34 KB

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