0004_snapshot.json 27 KB

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