0003_snapshot.json 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059
  1. {
  2. "id": "706203d5-4bfa-4a78-85ae-ad6c45e3a8b9",
  3. "prevId": "69a0a9f6-2d19-400d-bf4f-8b2692f05aed",
  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. "session_id": {
  196. "name": "session_id",
  197. "type": "varchar(64)",
  198. "primaryKey": false,
  199. "notNull": false
  200. },
  201. "provider_chain": {
  202. "name": "provider_chain",
  203. "type": "jsonb",
  204. "primaryKey": false,
  205. "notNull": false
  206. },
  207. "status_code": {
  208. "name": "status_code",
  209. "type": "integer",
  210. "primaryKey": false,
  211. "notNull": false
  212. },
  213. "api_type": {
  214. "name": "api_type",
  215. "type": "varchar(20)",
  216. "primaryKey": false,
  217. "notNull": false
  218. },
  219. "input_tokens": {
  220. "name": "input_tokens",
  221. "type": "integer",
  222. "primaryKey": false,
  223. "notNull": false
  224. },
  225. "output_tokens": {
  226. "name": "output_tokens",
  227. "type": "integer",
  228. "primaryKey": false,
  229. "notNull": false
  230. },
  231. "cache_creation_input_tokens": {
  232. "name": "cache_creation_input_tokens",
  233. "type": "integer",
  234. "primaryKey": false,
  235. "notNull": false
  236. },
  237. "cache_read_input_tokens": {
  238. "name": "cache_read_input_tokens",
  239. "type": "integer",
  240. "primaryKey": false,
  241. "notNull": false
  242. },
  243. "error_message": {
  244. "name": "error_message",
  245. "type": "text",
  246. "primaryKey": false,
  247. "notNull": false
  248. },
  249. "blocked_by": {
  250. "name": "blocked_by",
  251. "type": "varchar(50)",
  252. "primaryKey": false,
  253. "notNull": false
  254. },
  255. "blocked_reason": {
  256. "name": "blocked_reason",
  257. "type": "text",
  258. "primaryKey": false,
  259. "notNull": false
  260. },
  261. "created_at": {
  262. "name": "created_at",
  263. "type": "timestamp with time zone",
  264. "primaryKey": false,
  265. "notNull": false,
  266. "default": "now()"
  267. },
  268. "updated_at": {
  269. "name": "updated_at",
  270. "type": "timestamp with time zone",
  271. "primaryKey": false,
  272. "notNull": false,
  273. "default": "now()"
  274. },
  275. "deleted_at": {
  276. "name": "deleted_at",
  277. "type": "timestamp with time zone",
  278. "primaryKey": false,
  279. "notNull": false
  280. }
  281. },
  282. "indexes": {
  283. "idx_message_request_user_date_cost": {
  284. "name": "idx_message_request_user_date_cost",
  285. "columns": [
  286. {
  287. "expression": "user_id",
  288. "isExpression": false,
  289. "asc": true,
  290. "nulls": "last"
  291. },
  292. {
  293. "expression": "created_at",
  294. "isExpression": false,
  295. "asc": true,
  296. "nulls": "last"
  297. },
  298. {
  299. "expression": "cost_usd",
  300. "isExpression": false,
  301. "asc": true,
  302. "nulls": "last"
  303. }
  304. ],
  305. "isUnique": false,
  306. "where": "\"message_request\".\"deleted_at\" IS NULL",
  307. "concurrently": false,
  308. "method": "btree",
  309. "with": {}
  310. },
  311. "idx_message_request_user_query": {
  312. "name": "idx_message_request_user_query",
  313. "columns": [
  314. {
  315. "expression": "user_id",
  316. "isExpression": false,
  317. "asc": true,
  318. "nulls": "last"
  319. },
  320. {
  321. "expression": "created_at",
  322. "isExpression": false,
  323. "asc": true,
  324. "nulls": "last"
  325. }
  326. ],
  327. "isUnique": false,
  328. "where": "\"message_request\".\"deleted_at\" IS NULL",
  329. "concurrently": false,
  330. "method": "btree",
  331. "with": {}
  332. },
  333. "idx_message_request_session_id": {
  334. "name": "idx_message_request_session_id",
  335. "columns": [
  336. {
  337. "expression": "session_id",
  338. "isExpression": false,
  339. "asc": true,
  340. "nulls": "last"
  341. }
  342. ],
  343. "isUnique": false,
  344. "where": "\"message_request\".\"deleted_at\" IS NULL",
  345. "concurrently": false,
  346. "method": "btree",
  347. "with": {}
  348. },
  349. "idx_message_request_provider_id": {
  350. "name": "idx_message_request_provider_id",
  351. "columns": [
  352. {
  353. "expression": "provider_id",
  354. "isExpression": false,
  355. "asc": true,
  356. "nulls": "last"
  357. }
  358. ],
  359. "isUnique": false,
  360. "concurrently": false,
  361. "method": "btree",
  362. "with": {}
  363. },
  364. "idx_message_request_user_id": {
  365. "name": "idx_message_request_user_id",
  366. "columns": [
  367. {
  368. "expression": "user_id",
  369. "isExpression": false,
  370. "asc": true,
  371. "nulls": "last"
  372. }
  373. ],
  374. "isUnique": false,
  375. "concurrently": false,
  376. "method": "btree",
  377. "with": {}
  378. },
  379. "idx_message_request_key": {
  380. "name": "idx_message_request_key",
  381. "columns": [
  382. {
  383. "expression": "key",
  384. "isExpression": false,
  385. "asc": true,
  386. "nulls": "last"
  387. }
  388. ],
  389. "isUnique": false,
  390. "concurrently": false,
  391. "method": "btree",
  392. "with": {}
  393. },
  394. "idx_message_request_created_at": {
  395. "name": "idx_message_request_created_at",
  396. "columns": [
  397. {
  398. "expression": "created_at",
  399. "isExpression": false,
  400. "asc": true,
  401. "nulls": "last"
  402. }
  403. ],
  404. "isUnique": false,
  405. "concurrently": false,
  406. "method": "btree",
  407. "with": {}
  408. },
  409. "idx_message_request_deleted_at": {
  410. "name": "idx_message_request_deleted_at",
  411. "columns": [
  412. {
  413. "expression": "deleted_at",
  414. "isExpression": false,
  415. "asc": true,
  416. "nulls": "last"
  417. }
  418. ],
  419. "isUnique": false,
  420. "concurrently": false,
  421. "method": "btree",
  422. "with": {}
  423. }
  424. },
  425. "foreignKeys": {},
  426. "compositePrimaryKeys": {},
  427. "uniqueConstraints": {},
  428. "policies": {},
  429. "checkConstraints": {},
  430. "isRLSEnabled": false
  431. },
  432. "public.model_prices": {
  433. "name": "model_prices",
  434. "schema": "",
  435. "columns": {
  436. "id": {
  437. "name": "id",
  438. "type": "serial",
  439. "primaryKey": true,
  440. "notNull": true
  441. },
  442. "model_name": {
  443. "name": "model_name",
  444. "type": "varchar",
  445. "primaryKey": false,
  446. "notNull": true
  447. },
  448. "price_data": {
  449. "name": "price_data",
  450. "type": "jsonb",
  451. "primaryKey": false,
  452. "notNull": true
  453. },
  454. "created_at": {
  455. "name": "created_at",
  456. "type": "timestamp with time zone",
  457. "primaryKey": false,
  458. "notNull": false,
  459. "default": "now()"
  460. },
  461. "updated_at": {
  462. "name": "updated_at",
  463. "type": "timestamp with time zone",
  464. "primaryKey": false,
  465. "notNull": false,
  466. "default": "now()"
  467. }
  468. },
  469. "indexes": {
  470. "idx_model_prices_latest": {
  471. "name": "idx_model_prices_latest",
  472. "columns": [
  473. {
  474. "expression": "model_name",
  475. "isExpression": false,
  476. "asc": true,
  477. "nulls": "last"
  478. },
  479. {
  480. "expression": "created_at",
  481. "isExpression": false,
  482. "asc": false,
  483. "nulls": "last"
  484. }
  485. ],
  486. "isUnique": false,
  487. "concurrently": false,
  488. "method": "btree",
  489. "with": {}
  490. },
  491. "idx_model_prices_model_name": {
  492. "name": "idx_model_prices_model_name",
  493. "columns": [
  494. {
  495. "expression": "model_name",
  496. "isExpression": false,
  497. "asc": true,
  498. "nulls": "last"
  499. }
  500. ],
  501. "isUnique": false,
  502. "concurrently": false,
  503. "method": "btree",
  504. "with": {}
  505. },
  506. "idx_model_prices_created_at": {
  507. "name": "idx_model_prices_created_at",
  508. "columns": [
  509. {
  510. "expression": "created_at",
  511. "isExpression": false,
  512. "asc": false,
  513. "nulls": "last"
  514. }
  515. ],
  516. "isUnique": false,
  517. "concurrently": false,
  518. "method": "btree",
  519. "with": {}
  520. }
  521. },
  522. "foreignKeys": {},
  523. "compositePrimaryKeys": {},
  524. "uniqueConstraints": {},
  525. "policies": {},
  526. "checkConstraints": {},
  527. "isRLSEnabled": false
  528. },
  529. "public.providers": {
  530. "name": "providers",
  531. "schema": "",
  532. "columns": {
  533. "id": {
  534. "name": "id",
  535. "type": "serial",
  536. "primaryKey": true,
  537. "notNull": true
  538. },
  539. "name": {
  540. "name": "name",
  541. "type": "varchar",
  542. "primaryKey": false,
  543. "notNull": true
  544. },
  545. "description": {
  546. "name": "description",
  547. "type": "text",
  548. "primaryKey": false,
  549. "notNull": false
  550. },
  551. "url": {
  552. "name": "url",
  553. "type": "varchar",
  554. "primaryKey": false,
  555. "notNull": true
  556. },
  557. "key": {
  558. "name": "key",
  559. "type": "varchar",
  560. "primaryKey": false,
  561. "notNull": true
  562. },
  563. "is_enabled": {
  564. "name": "is_enabled",
  565. "type": "boolean",
  566. "primaryKey": false,
  567. "notNull": true,
  568. "default": true
  569. },
  570. "weight": {
  571. "name": "weight",
  572. "type": "integer",
  573. "primaryKey": false,
  574. "notNull": true,
  575. "default": 1
  576. },
  577. "priority": {
  578. "name": "priority",
  579. "type": "integer",
  580. "primaryKey": false,
  581. "notNull": true,
  582. "default": 0
  583. },
  584. "cost_multiplier": {
  585. "name": "cost_multiplier",
  586. "type": "numeric(10, 4)",
  587. "primaryKey": false,
  588. "notNull": false,
  589. "default": "'1.0'"
  590. },
  591. "group_tag": {
  592. "name": "group_tag",
  593. "type": "varchar(50)",
  594. "primaryKey": false,
  595. "notNull": false
  596. },
  597. "provider_type": {
  598. "name": "provider_type",
  599. "type": "varchar(20)",
  600. "primaryKey": false,
  601. "notNull": true,
  602. "default": "'claude'"
  603. },
  604. "model_redirects": {
  605. "name": "model_redirects",
  606. "type": "jsonb",
  607. "primaryKey": false,
  608. "notNull": false
  609. },
  610. "limit_5h_usd": {
  611. "name": "limit_5h_usd",
  612. "type": "numeric(10, 2)",
  613. "primaryKey": false,
  614. "notNull": false
  615. },
  616. "limit_weekly_usd": {
  617. "name": "limit_weekly_usd",
  618. "type": "numeric(10, 2)",
  619. "primaryKey": false,
  620. "notNull": false
  621. },
  622. "limit_monthly_usd": {
  623. "name": "limit_monthly_usd",
  624. "type": "numeric(10, 2)",
  625. "primaryKey": false,
  626. "notNull": false
  627. },
  628. "limit_concurrent_sessions": {
  629. "name": "limit_concurrent_sessions",
  630. "type": "integer",
  631. "primaryKey": false,
  632. "notNull": false,
  633. "default": 0
  634. },
  635. "tpm": {
  636. "name": "tpm",
  637. "type": "integer",
  638. "primaryKey": false,
  639. "notNull": false,
  640. "default": 0
  641. },
  642. "rpm": {
  643. "name": "rpm",
  644. "type": "integer",
  645. "primaryKey": false,
  646. "notNull": false,
  647. "default": 0
  648. },
  649. "rpd": {
  650. "name": "rpd",
  651. "type": "integer",
  652. "primaryKey": false,
  653. "notNull": false,
  654. "default": 0
  655. },
  656. "cc": {
  657. "name": "cc",
  658. "type": "integer",
  659. "primaryKey": false,
  660. "notNull": false,
  661. "default": 0
  662. },
  663. "created_at": {
  664. "name": "created_at",
  665. "type": "timestamp with time zone",
  666. "primaryKey": false,
  667. "notNull": false,
  668. "default": "now()"
  669. },
  670. "updated_at": {
  671. "name": "updated_at",
  672. "type": "timestamp with time zone",
  673. "primaryKey": false,
  674. "notNull": false,
  675. "default": "now()"
  676. },
  677. "deleted_at": {
  678. "name": "deleted_at",
  679. "type": "timestamp with time zone",
  680. "primaryKey": false,
  681. "notNull": false
  682. }
  683. },
  684. "indexes": {
  685. "idx_providers_enabled_priority": {
  686. "name": "idx_providers_enabled_priority",
  687. "columns": [
  688. {
  689. "expression": "is_enabled",
  690. "isExpression": false,
  691. "asc": true,
  692. "nulls": "last"
  693. },
  694. {
  695. "expression": "priority",
  696. "isExpression": false,
  697. "asc": true,
  698. "nulls": "last"
  699. },
  700. {
  701. "expression": "weight",
  702. "isExpression": false,
  703. "asc": true,
  704. "nulls": "last"
  705. }
  706. ],
  707. "isUnique": false,
  708. "where": "\"providers\".\"deleted_at\" IS NULL",
  709. "concurrently": false,
  710. "method": "btree",
  711. "with": {}
  712. },
  713. "idx_providers_group": {
  714. "name": "idx_providers_group",
  715. "columns": [
  716. {
  717. "expression": "group_tag",
  718. "isExpression": false,
  719. "asc": true,
  720. "nulls": "last"
  721. }
  722. ],
  723. "isUnique": false,
  724. "where": "\"providers\".\"deleted_at\" IS NULL",
  725. "concurrently": false,
  726. "method": "btree",
  727. "with": {}
  728. },
  729. "idx_providers_created_at": {
  730. "name": "idx_providers_created_at",
  731. "columns": [
  732. {
  733. "expression": "created_at",
  734. "isExpression": false,
  735. "asc": true,
  736. "nulls": "last"
  737. }
  738. ],
  739. "isUnique": false,
  740. "concurrently": false,
  741. "method": "btree",
  742. "with": {}
  743. },
  744. "idx_providers_deleted_at": {
  745. "name": "idx_providers_deleted_at",
  746. "columns": [
  747. {
  748. "expression": "deleted_at",
  749. "isExpression": false,
  750. "asc": true,
  751. "nulls": "last"
  752. }
  753. ],
  754. "isUnique": false,
  755. "concurrently": false,
  756. "method": "btree",
  757. "with": {}
  758. }
  759. },
  760. "foreignKeys": {},
  761. "compositePrimaryKeys": {},
  762. "uniqueConstraints": {},
  763. "policies": {},
  764. "checkConstraints": {},
  765. "isRLSEnabled": false
  766. },
  767. "public.sensitive_words": {
  768. "name": "sensitive_words",
  769. "schema": "",
  770. "columns": {
  771. "id": {
  772. "name": "id",
  773. "type": "serial",
  774. "primaryKey": true,
  775. "notNull": true
  776. },
  777. "word": {
  778. "name": "word",
  779. "type": "varchar(255)",
  780. "primaryKey": false,
  781. "notNull": true
  782. },
  783. "match_type": {
  784. "name": "match_type",
  785. "type": "varchar(20)",
  786. "primaryKey": false,
  787. "notNull": true,
  788. "default": "'contains'"
  789. },
  790. "description": {
  791. "name": "description",
  792. "type": "text",
  793. "primaryKey": false,
  794. "notNull": false
  795. },
  796. "is_enabled": {
  797. "name": "is_enabled",
  798. "type": "boolean",
  799. "primaryKey": false,
  800. "notNull": true,
  801. "default": true
  802. },
  803. "created_at": {
  804. "name": "created_at",
  805. "type": "timestamp with time zone",
  806. "primaryKey": false,
  807. "notNull": false,
  808. "default": "now()"
  809. },
  810. "updated_at": {
  811. "name": "updated_at",
  812. "type": "timestamp with time zone",
  813. "primaryKey": false,
  814. "notNull": false,
  815. "default": "now()"
  816. }
  817. },
  818. "indexes": {
  819. "idx_sensitive_words_enabled": {
  820. "name": "idx_sensitive_words_enabled",
  821. "columns": [
  822. {
  823. "expression": "is_enabled",
  824. "isExpression": false,
  825. "asc": true,
  826. "nulls": "last"
  827. },
  828. {
  829. "expression": "match_type",
  830. "isExpression": false,
  831. "asc": true,
  832. "nulls": "last"
  833. }
  834. ],
  835. "isUnique": false,
  836. "concurrently": false,
  837. "method": "btree",
  838. "with": {}
  839. },
  840. "idx_sensitive_words_created_at": {
  841. "name": "idx_sensitive_words_created_at",
  842. "columns": [
  843. {
  844. "expression": "created_at",
  845. "isExpression": false,
  846. "asc": true,
  847. "nulls": "last"
  848. }
  849. ],
  850. "isUnique": false,
  851. "concurrently": false,
  852. "method": "btree",
  853. "with": {}
  854. }
  855. },
  856. "foreignKeys": {},
  857. "compositePrimaryKeys": {},
  858. "uniqueConstraints": {},
  859. "policies": {},
  860. "checkConstraints": {},
  861. "isRLSEnabled": false
  862. },
  863. "public.system_settings": {
  864. "name": "system_settings",
  865. "schema": "",
  866. "columns": {
  867. "id": {
  868. "name": "id",
  869. "type": "serial",
  870. "primaryKey": true,
  871. "notNull": true
  872. },
  873. "site_title": {
  874. "name": "site_title",
  875. "type": "varchar(128)",
  876. "primaryKey": false,
  877. "notNull": true,
  878. "default": "'Claude Code Hub'"
  879. },
  880. "allow_global_usage_view": {
  881. "name": "allow_global_usage_view",
  882. "type": "boolean",
  883. "primaryKey": false,
  884. "notNull": true,
  885. "default": false
  886. },
  887. "created_at": {
  888. "name": "created_at",
  889. "type": "timestamp with time zone",
  890. "primaryKey": false,
  891. "notNull": false,
  892. "default": "now()"
  893. },
  894. "updated_at": {
  895. "name": "updated_at",
  896. "type": "timestamp with time zone",
  897. "primaryKey": false,
  898. "notNull": false,
  899. "default": "now()"
  900. }
  901. },
  902. "indexes": {},
  903. "foreignKeys": {},
  904. "compositePrimaryKeys": {},
  905. "uniqueConstraints": {},
  906. "policies": {},
  907. "checkConstraints": {},
  908. "isRLSEnabled": false
  909. },
  910. "public.users": {
  911. "name": "users",
  912. "schema": "",
  913. "columns": {
  914. "id": {
  915. "name": "id",
  916. "type": "serial",
  917. "primaryKey": true,
  918. "notNull": true
  919. },
  920. "name": {
  921. "name": "name",
  922. "type": "varchar",
  923. "primaryKey": false,
  924. "notNull": true
  925. },
  926. "description": {
  927. "name": "description",
  928. "type": "text",
  929. "primaryKey": false,
  930. "notNull": false
  931. },
  932. "role": {
  933. "name": "role",
  934. "type": "varchar",
  935. "primaryKey": false,
  936. "notNull": false,
  937. "default": "'user'"
  938. },
  939. "rpm_limit": {
  940. "name": "rpm_limit",
  941. "type": "integer",
  942. "primaryKey": false,
  943. "notNull": false,
  944. "default": 60
  945. },
  946. "daily_limit_usd": {
  947. "name": "daily_limit_usd",
  948. "type": "numeric(10, 2)",
  949. "primaryKey": false,
  950. "notNull": false,
  951. "default": "'100.00'"
  952. },
  953. "provider_group": {
  954. "name": "provider_group",
  955. "type": "varchar(50)",
  956. "primaryKey": false,
  957. "notNull": false
  958. },
  959. "created_at": {
  960. "name": "created_at",
  961. "type": "timestamp with time zone",
  962. "primaryKey": false,
  963. "notNull": false,
  964. "default": "now()"
  965. },
  966. "updated_at": {
  967. "name": "updated_at",
  968. "type": "timestamp with time zone",
  969. "primaryKey": false,
  970. "notNull": false,
  971. "default": "now()"
  972. },
  973. "deleted_at": {
  974. "name": "deleted_at",
  975. "type": "timestamp with time zone",
  976. "primaryKey": false,
  977. "notNull": false
  978. }
  979. },
  980. "indexes": {
  981. "idx_users_active_role_sort": {
  982. "name": "idx_users_active_role_sort",
  983. "columns": [
  984. {
  985. "expression": "deleted_at",
  986. "isExpression": false,
  987. "asc": true,
  988. "nulls": "last"
  989. },
  990. {
  991. "expression": "role",
  992. "isExpression": false,
  993. "asc": true,
  994. "nulls": "last"
  995. },
  996. {
  997. "expression": "id",
  998. "isExpression": false,
  999. "asc": true,
  1000. "nulls": "last"
  1001. }
  1002. ],
  1003. "isUnique": false,
  1004. "where": "\"users\".\"deleted_at\" IS NULL",
  1005. "concurrently": false,
  1006. "method": "btree",
  1007. "with": {}
  1008. },
  1009. "idx_users_created_at": {
  1010. "name": "idx_users_created_at",
  1011. "columns": [
  1012. {
  1013. "expression": "created_at",
  1014. "isExpression": false,
  1015. "asc": true,
  1016. "nulls": "last"
  1017. }
  1018. ],
  1019. "isUnique": false,
  1020. "concurrently": false,
  1021. "method": "btree",
  1022. "with": {}
  1023. },
  1024. "idx_users_deleted_at": {
  1025. "name": "idx_users_deleted_at",
  1026. "columns": [
  1027. {
  1028. "expression": "deleted_at",
  1029. "isExpression": false,
  1030. "asc": true,
  1031. "nulls": "last"
  1032. }
  1033. ],
  1034. "isUnique": false,
  1035. "concurrently": false,
  1036. "method": "btree",
  1037. "with": {}
  1038. }
  1039. },
  1040. "foreignKeys": {},
  1041. "compositePrimaryKeys": {},
  1042. "uniqueConstraints": {},
  1043. "policies": {},
  1044. "checkConstraints": {},
  1045. "isRLSEnabled": false
  1046. }
  1047. },
  1048. "enums": {},
  1049. "schemas": {},
  1050. "sequences": {},
  1051. "roles": {},
  1052. "policies": {},
  1053. "views": {},
  1054. "_meta": {
  1055. "columns": {},
  1056. "schemas": {},
  1057. "tables": {}
  1058. }
  1059. }