0007_snapshot.json 28 KB

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