0008_snapshot.json 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563
  1. {
  2. "id": "b6c2f395-ec3b-49a6-ba33-e9c6cd31a407",
  3. "prevId": "794ed447-fba9-4717-ac3d-db0c1b7ca36f",
  4. "version": "7",
  5. "dialect": "postgresql",
  6. "tables": {
  7. "public.accounts": {
  8. "name": "accounts",
  9. "schema": "",
  10. "columns": {
  11. "id": {
  12. "name": "id",
  13. "type": "text",
  14. "primaryKey": true,
  15. "notNull": true
  16. },
  17. "user_id": {
  18. "name": "user_id",
  19. "type": "text",
  20. "primaryKey": false,
  21. "notNull": true
  22. },
  23. "account_id": {
  24. "name": "account_id",
  25. "type": "text",
  26. "primaryKey": false,
  27. "notNull": true
  28. },
  29. "provider_id": {
  30. "name": "provider_id",
  31. "type": "text",
  32. "primaryKey": false,
  33. "notNull": true
  34. },
  35. "access_token": {
  36. "name": "access_token",
  37. "type": "text",
  38. "primaryKey": false,
  39. "notNull": false
  40. },
  41. "refresh_token": {
  42. "name": "refresh_token",
  43. "type": "text",
  44. "primaryKey": false,
  45. "notNull": false
  46. },
  47. "id_token": {
  48. "name": "id_token",
  49. "type": "text",
  50. "primaryKey": false,
  51. "notNull": false
  52. },
  53. "access_token_expires_at": {
  54. "name": "access_token_expires_at",
  55. "type": "timestamp with time zone",
  56. "primaryKey": false,
  57. "notNull": false
  58. },
  59. "refresh_token_expires_at": {
  60. "name": "refresh_token_expires_at",
  61. "type": "timestamp with time zone",
  62. "primaryKey": false,
  63. "notNull": false
  64. },
  65. "scope": {
  66. "name": "scope",
  67. "type": "text",
  68. "primaryKey": false,
  69. "notNull": false
  70. },
  71. "password": {
  72. "name": "password",
  73. "type": "text",
  74. "primaryKey": false,
  75. "notNull": false
  76. },
  77. "created_at": {
  78. "name": "created_at",
  79. "type": "timestamp with time zone",
  80. "primaryKey": false,
  81. "notNull": true,
  82. "default": "now()"
  83. },
  84. "updated_at": {
  85. "name": "updated_at",
  86. "type": "timestamp with time zone",
  87. "primaryKey": false,
  88. "notNull": true,
  89. "default": "now()"
  90. }
  91. },
  92. "indexes": {
  93. "accounts_user_id_idx": {
  94. "name": "accounts_user_id_idx",
  95. "columns": [
  96. {
  97. "expression": "user_id",
  98. "isExpression": false,
  99. "asc": true,
  100. "nulls": "last"
  101. }
  102. ],
  103. "isUnique": false,
  104. "concurrently": false,
  105. "method": "btree",
  106. "with": {}
  107. },
  108. "accounts_provider_account_idx": {
  109. "name": "accounts_provider_account_idx",
  110. "columns": [
  111. {
  112. "expression": "provider_id",
  113. "isExpression": false,
  114. "asc": true,
  115. "nulls": "last"
  116. },
  117. {
  118. "expression": "account_id",
  119. "isExpression": false,
  120. "asc": true,
  121. "nulls": "last"
  122. }
  123. ],
  124. "isUnique": true,
  125. "concurrently": false,
  126. "method": "btree",
  127. "with": {}
  128. }
  129. },
  130. "foreignKeys": {
  131. "accounts_user_id_users_id_fk": {
  132. "name": "accounts_user_id_users_id_fk",
  133. "tableFrom": "accounts",
  134. "tableTo": "users",
  135. "columnsFrom": ["user_id"],
  136. "columnsTo": ["id"],
  137. "onDelete": "cascade",
  138. "onUpdate": "no action"
  139. }
  140. },
  141. "compositePrimaryKeys": {},
  142. "uniqueConstraints": {},
  143. "policies": {},
  144. "checkConstraints": {},
  145. "isRLSEnabled": false
  146. },
  147. "public.api_keys": {
  148. "name": "api_keys",
  149. "schema": "",
  150. "columns": {
  151. "id": {
  152. "name": "id",
  153. "type": "text",
  154. "primaryKey": true,
  155. "notNull": true
  156. },
  157. "project_id": {
  158. "name": "project_id",
  159. "type": "text",
  160. "primaryKey": false,
  161. "notNull": true
  162. },
  163. "created_by": {
  164. "name": "created_by",
  165. "type": "text",
  166. "primaryKey": false,
  167. "notNull": true
  168. },
  169. "name": {
  170. "name": "name",
  171. "type": "text",
  172. "primaryKey": false,
  173. "notNull": true
  174. },
  175. "hash": {
  176. "name": "hash",
  177. "type": "text",
  178. "primaryKey": false,
  179. "notNull": true
  180. },
  181. "suffix": {
  182. "name": "suffix",
  183. "type": "varchar(4)",
  184. "primaryKey": false,
  185. "notNull": true
  186. },
  187. "last_used_at": {
  188. "name": "last_used_at",
  189. "type": "timestamp with time zone",
  190. "primaryKey": false,
  191. "notNull": false
  192. },
  193. "expires_at": {
  194. "name": "expires_at",
  195. "type": "timestamp with time zone",
  196. "primaryKey": false,
  197. "notNull": false
  198. },
  199. "created_at": {
  200. "name": "created_at",
  201. "type": "timestamp with time zone",
  202. "primaryKey": false,
  203. "notNull": true,
  204. "default": "now()"
  205. },
  206. "revoked_at": {
  207. "name": "revoked_at",
  208. "type": "timestamp with time zone",
  209. "primaryKey": false,
  210. "notNull": false
  211. }
  212. },
  213. "indexes": {
  214. "api_keys_hash_idx": {
  215. "name": "api_keys_hash_idx",
  216. "columns": [
  217. {
  218. "expression": "hash",
  219. "isExpression": false,
  220. "asc": true,
  221. "nulls": "last"
  222. }
  223. ],
  224. "isUnique": true,
  225. "concurrently": false,
  226. "method": "btree",
  227. "with": {}
  228. },
  229. "api_keys_project_idx": {
  230. "name": "api_keys_project_idx",
  231. "columns": [
  232. {
  233. "expression": "project_id",
  234. "isExpression": false,
  235. "asc": true,
  236. "nulls": "last"
  237. }
  238. ],
  239. "isUnique": false,
  240. "concurrently": false,
  241. "method": "btree",
  242. "with": {}
  243. }
  244. },
  245. "foreignKeys": {
  246. "api_keys_project_id_projects_id_fk": {
  247. "name": "api_keys_project_id_projects_id_fk",
  248. "tableFrom": "api_keys",
  249. "tableTo": "projects",
  250. "columnsFrom": ["project_id"],
  251. "columnsTo": ["id"],
  252. "onDelete": "cascade",
  253. "onUpdate": "no action"
  254. },
  255. "api_keys_created_by_users_id_fk": {
  256. "name": "api_keys_created_by_users_id_fk",
  257. "tableFrom": "api_keys",
  258. "tableTo": "users",
  259. "columnsFrom": ["created_by"],
  260. "columnsTo": ["id"],
  261. "onDelete": "no action",
  262. "onUpdate": "no action"
  263. }
  264. },
  265. "compositePrimaryKeys": {},
  266. "uniqueConstraints": {},
  267. "policies": {},
  268. "checkConstraints": {},
  269. "isRLSEnabled": false
  270. },
  271. "public.audit_logs": {
  272. "name": "audit_logs",
  273. "schema": "",
  274. "columns": {
  275. "id": {
  276. "name": "id",
  277. "type": "text",
  278. "primaryKey": true,
  279. "notNull": true
  280. },
  281. "actor_id": {
  282. "name": "actor_id",
  283. "type": "text",
  284. "primaryKey": false,
  285. "notNull": false
  286. },
  287. "project_id": {
  288. "name": "project_id",
  289. "type": "text",
  290. "primaryKey": false,
  291. "notNull": false
  292. },
  293. "action": {
  294. "name": "action",
  295. "type": "text",
  296. "primaryKey": false,
  297. "notNull": true
  298. },
  299. "ip_hash": {
  300. "name": "ip_hash",
  301. "type": "varchar(64)",
  302. "primaryKey": false,
  303. "notNull": false
  304. },
  305. "user_agent": {
  306. "name": "user_agent",
  307. "type": "text",
  308. "primaryKey": false,
  309. "notNull": false
  310. },
  311. "metadata": {
  312. "name": "metadata",
  313. "type": "jsonb",
  314. "primaryKey": false,
  315. "notNull": false
  316. },
  317. "created_at": {
  318. "name": "created_at",
  319. "type": "timestamp with time zone",
  320. "primaryKey": false,
  321. "notNull": true,
  322. "default": "now()"
  323. }
  324. },
  325. "indexes": {
  326. "audit_logs_project_created_idx": {
  327. "name": "audit_logs_project_created_idx",
  328. "columns": [
  329. {
  330. "expression": "project_id",
  331. "isExpression": false,
  332. "asc": true,
  333. "nulls": "last"
  334. },
  335. {
  336. "expression": "created_at",
  337. "isExpression": false,
  338. "asc": true,
  339. "nulls": "last"
  340. }
  341. ],
  342. "isUnique": false,
  343. "concurrently": false,
  344. "method": "btree",
  345. "with": {}
  346. },
  347. "audit_logs_actor_created_idx": {
  348. "name": "audit_logs_actor_created_idx",
  349. "columns": [
  350. {
  351. "expression": "actor_id",
  352. "isExpression": false,
  353. "asc": true,
  354. "nulls": "last"
  355. },
  356. {
  357. "expression": "created_at",
  358. "isExpression": false,
  359. "asc": true,
  360. "nulls": "last"
  361. }
  362. ],
  363. "isUnique": false,
  364. "concurrently": false,
  365. "method": "btree",
  366. "with": {}
  367. }
  368. },
  369. "foreignKeys": {
  370. "audit_logs_actor_id_users_id_fk": {
  371. "name": "audit_logs_actor_id_users_id_fk",
  372. "tableFrom": "audit_logs",
  373. "tableTo": "users",
  374. "columnsFrom": ["actor_id"],
  375. "columnsTo": ["id"],
  376. "onDelete": "no action",
  377. "onUpdate": "no action"
  378. },
  379. "audit_logs_project_id_projects_id_fk": {
  380. "name": "audit_logs_project_id_projects_id_fk",
  381. "tableFrom": "audit_logs",
  382. "tableTo": "projects",
  383. "columnsFrom": ["project_id"],
  384. "columnsTo": ["id"],
  385. "onDelete": "no action",
  386. "onUpdate": "no action"
  387. }
  388. },
  389. "compositePrimaryKeys": {},
  390. "uniqueConstraints": {},
  391. "policies": {},
  392. "checkConstraints": {},
  393. "isRLSEnabled": false
  394. },
  395. "public.deployments": {
  396. "name": "deployments",
  397. "schema": "",
  398. "columns": {
  399. "id": {
  400. "name": "id",
  401. "type": "text",
  402. "primaryKey": true,
  403. "notNull": true
  404. },
  405. "project_id": {
  406. "name": "project_id",
  407. "type": "text",
  408. "primaryKey": false,
  409. "notNull": true
  410. },
  411. "triggered_by": {
  412. "name": "triggered_by",
  413. "type": "text",
  414. "primaryKey": false,
  415. "notNull": false
  416. },
  417. "api_key_id": {
  418. "name": "api_key_id",
  419. "type": "text",
  420. "primaryKey": false,
  421. "notNull": false
  422. },
  423. "status": {
  424. "name": "status",
  425. "type": "text",
  426. "primaryKey": false,
  427. "notNull": true,
  428. "default": "'pending'"
  429. },
  430. "schema_diff_summary": {
  431. "name": "schema_diff_summary",
  432. "type": "jsonb",
  433. "primaryKey": false,
  434. "notNull": false
  435. },
  436. "schema_snapshot": {
  437. "name": "schema_snapshot",
  438. "type": "jsonb",
  439. "primaryKey": false,
  440. "notNull": false
  441. },
  442. "function_count": {
  443. "name": "function_count",
  444. "type": "varchar(12)",
  445. "primaryKey": false,
  446. "notNull": false
  447. },
  448. "function_names": {
  449. "name": "function_names",
  450. "type": "jsonb",
  451. "primaryKey": false,
  452. "notNull": false
  453. },
  454. "bundle": {
  455. "name": "bundle",
  456. "type": "jsonb",
  457. "primaryKey": false,
  458. "notNull": false
  459. },
  460. "error_code": {
  461. "name": "error_code",
  462. "type": "text",
  463. "primaryKey": false,
  464. "notNull": false
  465. },
  466. "error_message": {
  467. "name": "error_message",
  468. "type": "text",
  469. "primaryKey": false,
  470. "notNull": false
  471. },
  472. "started_at": {
  473. "name": "started_at",
  474. "type": "timestamp with time zone",
  475. "primaryKey": false,
  476. "notNull": false
  477. },
  478. "finished_at": {
  479. "name": "finished_at",
  480. "type": "timestamp with time zone",
  481. "primaryKey": false,
  482. "notNull": false
  483. },
  484. "created_at": {
  485. "name": "created_at",
  486. "type": "timestamp with time zone",
  487. "primaryKey": false,
  488. "notNull": true,
  489. "default": "now()"
  490. }
  491. },
  492. "indexes": {
  493. "deployments_project_created_idx": {
  494. "name": "deployments_project_created_idx",
  495. "columns": [
  496. {
  497. "expression": "project_id",
  498. "isExpression": false,
  499. "asc": true,
  500. "nulls": "last"
  501. },
  502. {
  503. "expression": "created_at",
  504. "isExpression": false,
  505. "asc": true,
  506. "nulls": "last"
  507. }
  508. ],
  509. "isUnique": false,
  510. "concurrently": false,
  511. "method": "btree",
  512. "with": {}
  513. },
  514. "deployments_status_idx": {
  515. "name": "deployments_status_idx",
  516. "columns": [
  517. {
  518. "expression": "status",
  519. "isExpression": false,
  520. "asc": true,
  521. "nulls": "last"
  522. }
  523. ],
  524. "isUnique": false,
  525. "concurrently": false,
  526. "method": "btree",
  527. "with": {}
  528. }
  529. },
  530. "foreignKeys": {
  531. "deployments_project_id_projects_id_fk": {
  532. "name": "deployments_project_id_projects_id_fk",
  533. "tableFrom": "deployments",
  534. "tableTo": "projects",
  535. "columnsFrom": ["project_id"],
  536. "columnsTo": ["id"],
  537. "onDelete": "cascade",
  538. "onUpdate": "no action"
  539. },
  540. "deployments_triggered_by_users_id_fk": {
  541. "name": "deployments_triggered_by_users_id_fk",
  542. "tableFrom": "deployments",
  543. "tableTo": "users",
  544. "columnsFrom": ["triggered_by"],
  545. "columnsTo": ["id"],
  546. "onDelete": "no action",
  547. "onUpdate": "no action"
  548. },
  549. "deployments_api_key_id_api_keys_id_fk": {
  550. "name": "deployments_api_key_id_api_keys_id_fk",
  551. "tableFrom": "deployments",
  552. "tableTo": "api_keys",
  553. "columnsFrom": ["api_key_id"],
  554. "columnsTo": ["id"],
  555. "onDelete": "no action",
  556. "onUpdate": "no action"
  557. }
  558. },
  559. "compositePrimaryKeys": {},
  560. "uniqueConstraints": {},
  561. "policies": {},
  562. "checkConstraints": {},
  563. "isRLSEnabled": false
  564. },
  565. "public.function_logs": {
  566. "name": "function_logs",
  567. "schema": "",
  568. "columns": {
  569. "id": {
  570. "name": "id",
  571. "type": "text",
  572. "primaryKey": true,
  573. "notNull": true
  574. },
  575. "project_id": {
  576. "name": "project_id",
  577. "type": "text",
  578. "primaryKey": false,
  579. "notNull": true
  580. },
  581. "deployment_id": {
  582. "name": "deployment_id",
  583. "type": "text",
  584. "primaryKey": false,
  585. "notNull": true
  586. },
  587. "invocation_id": {
  588. "name": "invocation_id",
  589. "type": "text",
  590. "primaryKey": false,
  591. "notNull": true
  592. },
  593. "function_name": {
  594. "name": "function_name",
  595. "type": "varchar(128)",
  596. "primaryKey": false,
  597. "notNull": true
  598. },
  599. "status": {
  600. "name": "status",
  601. "type": "varchar(8)",
  602. "primaryKey": false,
  603. "notNull": true
  604. },
  605. "duration_ms": {
  606. "name": "duration_ms",
  607. "type": "varchar(12)",
  608. "primaryKey": false,
  609. "notNull": true
  610. },
  611. "touched_tables": {
  612. "name": "touched_tables",
  613. "type": "jsonb",
  614. "primaryKey": false,
  615. "notNull": true
  616. },
  617. "user_logs_json": {
  618. "name": "user_logs_json",
  619. "type": "jsonb",
  620. "primaryKey": false,
  621. "notNull": true
  622. },
  623. "err_code": {
  624. "name": "err_code",
  625. "type": "text",
  626. "primaryKey": false,
  627. "notNull": false
  628. },
  629. "err_message": {
  630. "name": "err_message",
  631. "type": "text",
  632. "primaryKey": false,
  633. "notNull": false
  634. },
  635. "created_at": {
  636. "name": "created_at",
  637. "type": "timestamp with time zone",
  638. "primaryKey": false,
  639. "notNull": true,
  640. "default": "now()"
  641. }
  642. },
  643. "indexes": {
  644. "function_logs_project_created_idx": {
  645. "name": "function_logs_project_created_idx",
  646. "columns": [
  647. {
  648. "expression": "project_id",
  649. "isExpression": false,
  650. "asc": true,
  651. "nulls": "last"
  652. },
  653. {
  654. "expression": "created_at",
  655. "isExpression": false,
  656. "asc": true,
  657. "nulls": "last"
  658. }
  659. ],
  660. "isUnique": false,
  661. "concurrently": false,
  662. "method": "btree",
  663. "with": {}
  664. }
  665. },
  666. "foreignKeys": {
  667. "function_logs_project_id_projects_id_fk": {
  668. "name": "function_logs_project_id_projects_id_fk",
  669. "tableFrom": "function_logs",
  670. "tableTo": "projects",
  671. "columnsFrom": ["project_id"],
  672. "columnsTo": ["id"],
  673. "onDelete": "cascade",
  674. "onUpdate": "no action"
  675. },
  676. "function_logs_deployment_id_deployments_id_fk": {
  677. "name": "function_logs_deployment_id_deployments_id_fk",
  678. "tableFrom": "function_logs",
  679. "tableTo": "deployments",
  680. "columnsFrom": ["deployment_id"],
  681. "columnsTo": ["id"],
  682. "onDelete": "cascade",
  683. "onUpdate": "no action"
  684. }
  685. },
  686. "compositePrimaryKeys": {},
  687. "uniqueConstraints": {},
  688. "policies": {},
  689. "checkConstraints": {},
  690. "isRLSEnabled": false
  691. },
  692. "public.project_env_vars": {
  693. "name": "project_env_vars",
  694. "schema": "",
  695. "columns": {
  696. "id": {
  697. "name": "id",
  698. "type": "text",
  699. "primaryKey": true,
  700. "notNull": true
  701. },
  702. "project_id": {
  703. "name": "project_id",
  704. "type": "text",
  705. "primaryKey": false,
  706. "notNull": true
  707. },
  708. "key": {
  709. "name": "key",
  710. "type": "text",
  711. "primaryKey": false,
  712. "notNull": true
  713. },
  714. "encrypted_value": {
  715. "name": "encrypted_value",
  716. "type": "text",
  717. "primaryKey": false,
  718. "notNull": true
  719. },
  720. "created_by": {
  721. "name": "created_by",
  722. "type": "text",
  723. "primaryKey": false,
  724. "notNull": false
  725. },
  726. "created_at": {
  727. "name": "created_at",
  728. "type": "timestamp with time zone",
  729. "primaryKey": false,
  730. "notNull": true,
  731. "default": "now()"
  732. },
  733. "updated_at": {
  734. "name": "updated_at",
  735. "type": "timestamp with time zone",
  736. "primaryKey": false,
  737. "notNull": true,
  738. "default": "now()"
  739. }
  740. },
  741. "indexes": {
  742. "project_env_vars_project_key_idx": {
  743. "name": "project_env_vars_project_key_idx",
  744. "columns": [
  745. {
  746. "expression": "project_id",
  747. "isExpression": false,
  748. "asc": true,
  749. "nulls": "last"
  750. },
  751. {
  752. "expression": "key",
  753. "isExpression": false,
  754. "asc": true,
  755. "nulls": "last"
  756. }
  757. ],
  758. "isUnique": true,
  759. "concurrently": false,
  760. "method": "btree",
  761. "with": {}
  762. }
  763. },
  764. "foreignKeys": {
  765. "project_env_vars_project_id_projects_id_fk": {
  766. "name": "project_env_vars_project_id_projects_id_fk",
  767. "tableFrom": "project_env_vars",
  768. "tableTo": "projects",
  769. "columnsFrom": ["project_id"],
  770. "columnsTo": ["id"],
  771. "onDelete": "cascade",
  772. "onUpdate": "no action"
  773. },
  774. "project_env_vars_created_by_users_id_fk": {
  775. "name": "project_env_vars_created_by_users_id_fk",
  776. "tableFrom": "project_env_vars",
  777. "tableTo": "users",
  778. "columnsFrom": ["created_by"],
  779. "columnsTo": ["id"],
  780. "onDelete": "no action",
  781. "onUpdate": "no action"
  782. }
  783. },
  784. "compositePrimaryKeys": {},
  785. "uniqueConstraints": {},
  786. "policies": {},
  787. "checkConstraints": {},
  788. "isRLSEnabled": false
  789. },
  790. "public.project_invitations": {
  791. "name": "project_invitations",
  792. "schema": "",
  793. "columns": {
  794. "id": {
  795. "name": "id",
  796. "type": "text",
  797. "primaryKey": true,
  798. "notNull": true
  799. },
  800. "project_id": {
  801. "name": "project_id",
  802. "type": "text",
  803. "primaryKey": false,
  804. "notNull": true
  805. },
  806. "email": {
  807. "name": "email",
  808. "type": "text",
  809. "primaryKey": false,
  810. "notNull": true
  811. },
  812. "role": {
  813. "name": "role",
  814. "type": "text",
  815. "primaryKey": false,
  816. "notNull": true,
  817. "default": "'developer'"
  818. },
  819. "token_hash": {
  820. "name": "token_hash",
  821. "type": "text",
  822. "primaryKey": false,
  823. "notNull": true
  824. },
  825. "invited_by": {
  826. "name": "invited_by",
  827. "type": "text",
  828. "primaryKey": false,
  829. "notNull": false
  830. },
  831. "expires_at": {
  832. "name": "expires_at",
  833. "type": "timestamp with time zone",
  834. "primaryKey": false,
  835. "notNull": true
  836. },
  837. "accepted_at": {
  838. "name": "accepted_at",
  839. "type": "timestamp with time zone",
  840. "primaryKey": false,
  841. "notNull": false
  842. },
  843. "revoked_at": {
  844. "name": "revoked_at",
  845. "type": "timestamp with time zone",
  846. "primaryKey": false,
  847. "notNull": false
  848. },
  849. "created_at": {
  850. "name": "created_at",
  851. "type": "timestamp with time zone",
  852. "primaryKey": false,
  853. "notNull": true,
  854. "default": "now()"
  855. }
  856. },
  857. "indexes": {
  858. "project_invitations_project_email_idx": {
  859. "name": "project_invitations_project_email_idx",
  860. "columns": [
  861. {
  862. "expression": "project_id",
  863. "isExpression": false,
  864. "asc": true,
  865. "nulls": "last"
  866. },
  867. {
  868. "expression": "email",
  869. "isExpression": false,
  870. "asc": true,
  871. "nulls": "last"
  872. }
  873. ],
  874. "isUnique": true,
  875. "concurrently": false,
  876. "method": "btree",
  877. "with": {}
  878. },
  879. "project_invitations_token_idx": {
  880. "name": "project_invitations_token_idx",
  881. "columns": [
  882. {
  883. "expression": "token_hash",
  884. "isExpression": false,
  885. "asc": true,
  886. "nulls": "last"
  887. }
  888. ],
  889. "isUnique": true,
  890. "concurrently": false,
  891. "method": "btree",
  892. "with": {}
  893. }
  894. },
  895. "foreignKeys": {
  896. "project_invitations_project_id_projects_id_fk": {
  897. "name": "project_invitations_project_id_projects_id_fk",
  898. "tableFrom": "project_invitations",
  899. "tableTo": "projects",
  900. "columnsFrom": ["project_id"],
  901. "columnsTo": ["id"],
  902. "onDelete": "cascade",
  903. "onUpdate": "no action"
  904. },
  905. "project_invitations_invited_by_users_id_fk": {
  906. "name": "project_invitations_invited_by_users_id_fk",
  907. "tableFrom": "project_invitations",
  908. "tableTo": "users",
  909. "columnsFrom": ["invited_by"],
  910. "columnsTo": ["id"],
  911. "onDelete": "no action",
  912. "onUpdate": "no action"
  913. }
  914. },
  915. "compositePrimaryKeys": {},
  916. "uniqueConstraints": {},
  917. "policies": {},
  918. "checkConstraints": {},
  919. "isRLSEnabled": false
  920. },
  921. "public.project_members": {
  922. "name": "project_members",
  923. "schema": "",
  924. "columns": {
  925. "project_id": {
  926. "name": "project_id",
  927. "type": "text",
  928. "primaryKey": false,
  929. "notNull": true
  930. },
  931. "user_id": {
  932. "name": "user_id",
  933. "type": "text",
  934. "primaryKey": false,
  935. "notNull": true
  936. },
  937. "role": {
  938. "name": "role",
  939. "type": "text",
  940. "primaryKey": false,
  941. "notNull": true,
  942. "default": "'developer'"
  943. },
  944. "created_at": {
  945. "name": "created_at",
  946. "type": "timestamp with time zone",
  947. "primaryKey": false,
  948. "notNull": true,
  949. "default": "now()"
  950. },
  951. "updated_at": {
  952. "name": "updated_at",
  953. "type": "timestamp with time zone",
  954. "primaryKey": false,
  955. "notNull": true,
  956. "default": "now()"
  957. }
  958. },
  959. "indexes": {},
  960. "foreignKeys": {
  961. "project_members_project_id_projects_id_fk": {
  962. "name": "project_members_project_id_projects_id_fk",
  963. "tableFrom": "project_members",
  964. "tableTo": "projects",
  965. "columnsFrom": ["project_id"],
  966. "columnsTo": ["id"],
  967. "onDelete": "cascade",
  968. "onUpdate": "no action"
  969. },
  970. "project_members_user_id_users_id_fk": {
  971. "name": "project_members_user_id_users_id_fk",
  972. "tableFrom": "project_members",
  973. "tableTo": "users",
  974. "columnsFrom": ["user_id"],
  975. "columnsTo": ["id"],
  976. "onDelete": "cascade",
  977. "onUpdate": "no action"
  978. }
  979. },
  980. "compositePrimaryKeys": {
  981. "project_members_project_id_user_id_pk": {
  982. "name": "project_members_project_id_user_id_pk",
  983. "columns": ["project_id", "user_id"]
  984. }
  985. },
  986. "uniqueConstraints": {},
  987. "policies": {},
  988. "checkConstraints": {},
  989. "isRLSEnabled": false
  990. },
  991. "public.projects": {
  992. "name": "projects",
  993. "schema": "",
  994. "columns": {
  995. "id": {
  996. "name": "id",
  997. "type": "text",
  998. "primaryKey": true,
  999. "notNull": true
  1000. },
  1001. "slug": {
  1002. "name": "slug",
  1003. "type": "text",
  1004. "primaryKey": false,
  1005. "notNull": true
  1006. },
  1007. "name": {
  1008. "name": "name",
  1009. "type": "text",
  1010. "primaryKey": false,
  1011. "notNull": true
  1012. },
  1013. "owner_id": {
  1014. "name": "owner_id",
  1015. "type": "text",
  1016. "primaryKey": false,
  1017. "notNull": true
  1018. },
  1019. "region": {
  1020. "name": "region",
  1021. "type": "text",
  1022. "primaryKey": false,
  1023. "notNull": true,
  1024. "default": "'eu-west-1'"
  1025. },
  1026. "tier": {
  1027. "name": "tier",
  1028. "type": "text",
  1029. "primaryKey": false,
  1030. "notNull": true,
  1031. "default": "'free'"
  1032. },
  1033. "shard_id": {
  1034. "name": "shard_id",
  1035. "type": "text",
  1036. "primaryKey": false,
  1037. "notNull": false
  1038. },
  1039. "data_schema_name": {
  1040. "name": "data_schema_name",
  1041. "type": "text",
  1042. "primaryKey": false,
  1043. "notNull": false
  1044. },
  1045. "created_at": {
  1046. "name": "created_at",
  1047. "type": "timestamp with time zone",
  1048. "primaryKey": false,
  1049. "notNull": true,
  1050. "default": "now()"
  1051. },
  1052. "updated_at": {
  1053. "name": "updated_at",
  1054. "type": "timestamp with time zone",
  1055. "primaryKey": false,
  1056. "notNull": true,
  1057. "default": "now()"
  1058. },
  1059. "deleted_at": {
  1060. "name": "deleted_at",
  1061. "type": "timestamp with time zone",
  1062. "primaryKey": false,
  1063. "notNull": false
  1064. }
  1065. },
  1066. "indexes": {
  1067. "projects_slug_idx": {
  1068. "name": "projects_slug_idx",
  1069. "columns": [
  1070. {
  1071. "expression": "slug",
  1072. "isExpression": false,
  1073. "asc": true,
  1074. "nulls": "last"
  1075. }
  1076. ],
  1077. "isUnique": true,
  1078. "concurrently": false,
  1079. "method": "btree",
  1080. "with": {}
  1081. },
  1082. "projects_owner_idx": {
  1083. "name": "projects_owner_idx",
  1084. "columns": [
  1085. {
  1086. "expression": "owner_id",
  1087. "isExpression": false,
  1088. "asc": true,
  1089. "nulls": "last"
  1090. }
  1091. ],
  1092. "isUnique": false,
  1093. "concurrently": false,
  1094. "method": "btree",
  1095. "with": {}
  1096. }
  1097. },
  1098. "foreignKeys": {
  1099. "projects_owner_id_users_id_fk": {
  1100. "name": "projects_owner_id_users_id_fk",
  1101. "tableFrom": "projects",
  1102. "tableTo": "users",
  1103. "columnsFrom": ["owner_id"],
  1104. "columnsTo": ["id"],
  1105. "onDelete": "no action",
  1106. "onUpdate": "no action"
  1107. }
  1108. },
  1109. "compositePrimaryKeys": {},
  1110. "uniqueConstraints": {},
  1111. "policies": {},
  1112. "checkConstraints": {},
  1113. "isRLSEnabled": false
  1114. },
  1115. "public.sessions": {
  1116. "name": "sessions",
  1117. "schema": "",
  1118. "columns": {
  1119. "id": {
  1120. "name": "id",
  1121. "type": "text",
  1122. "primaryKey": true,
  1123. "notNull": true
  1124. },
  1125. "user_id": {
  1126. "name": "user_id",
  1127. "type": "text",
  1128. "primaryKey": false,
  1129. "notNull": true
  1130. },
  1131. "token": {
  1132. "name": "token",
  1133. "type": "text",
  1134. "primaryKey": false,
  1135. "notNull": true
  1136. },
  1137. "expires_at": {
  1138. "name": "expires_at",
  1139. "type": "timestamp with time zone",
  1140. "primaryKey": false,
  1141. "notNull": true
  1142. },
  1143. "ip_address": {
  1144. "name": "ip_address",
  1145. "type": "text",
  1146. "primaryKey": false,
  1147. "notNull": false
  1148. },
  1149. "user_agent": {
  1150. "name": "user_agent",
  1151. "type": "text",
  1152. "primaryKey": false,
  1153. "notNull": false
  1154. },
  1155. "created_at": {
  1156. "name": "created_at",
  1157. "type": "timestamp with time zone",
  1158. "primaryKey": false,
  1159. "notNull": true,
  1160. "default": "now()"
  1161. },
  1162. "updated_at": {
  1163. "name": "updated_at",
  1164. "type": "timestamp with time zone",
  1165. "primaryKey": false,
  1166. "notNull": true,
  1167. "default": "now()"
  1168. }
  1169. },
  1170. "indexes": {
  1171. "sessions_token_idx": {
  1172. "name": "sessions_token_idx",
  1173. "columns": [
  1174. {
  1175. "expression": "token",
  1176. "isExpression": false,
  1177. "asc": true,
  1178. "nulls": "last"
  1179. }
  1180. ],
  1181. "isUnique": true,
  1182. "concurrently": false,
  1183. "method": "btree",
  1184. "with": {}
  1185. },
  1186. "sessions_user_id_idx": {
  1187. "name": "sessions_user_id_idx",
  1188. "columns": [
  1189. {
  1190. "expression": "user_id",
  1191. "isExpression": false,
  1192. "asc": true,
  1193. "nulls": "last"
  1194. }
  1195. ],
  1196. "isUnique": false,
  1197. "concurrently": false,
  1198. "method": "btree",
  1199. "with": {}
  1200. }
  1201. },
  1202. "foreignKeys": {
  1203. "sessions_user_id_users_id_fk": {
  1204. "name": "sessions_user_id_users_id_fk",
  1205. "tableFrom": "sessions",
  1206. "tableTo": "users",
  1207. "columnsFrom": ["user_id"],
  1208. "columnsTo": ["id"],
  1209. "onDelete": "cascade",
  1210. "onUpdate": "no action"
  1211. }
  1212. },
  1213. "compositePrimaryKeys": {},
  1214. "uniqueConstraints": {},
  1215. "policies": {},
  1216. "checkConstraints": {},
  1217. "isRLSEnabled": false
  1218. },
  1219. "public.subscriptions": {
  1220. "name": "subscriptions",
  1221. "schema": "",
  1222. "columns": {
  1223. "id": {
  1224. "name": "id",
  1225. "type": "text",
  1226. "primaryKey": true,
  1227. "notNull": true
  1228. },
  1229. "owner_id": {
  1230. "name": "owner_id",
  1231. "type": "text",
  1232. "primaryKey": false,
  1233. "notNull": true
  1234. },
  1235. "polar_subscription_id": {
  1236. "name": "polar_subscription_id",
  1237. "type": "text",
  1238. "primaryKey": false,
  1239. "notNull": false
  1240. },
  1241. "polar_customer_id": {
  1242. "name": "polar_customer_id",
  1243. "type": "text",
  1244. "primaryKey": false,
  1245. "notNull": false
  1246. },
  1247. "tier": {
  1248. "name": "tier",
  1249. "type": "text",
  1250. "primaryKey": false,
  1251. "notNull": true,
  1252. "default": "'free'"
  1253. },
  1254. "status": {
  1255. "name": "status",
  1256. "type": "text",
  1257. "primaryKey": false,
  1258. "notNull": true,
  1259. "default": "'active'"
  1260. },
  1261. "current_period_end": {
  1262. "name": "current_period_end",
  1263. "type": "timestamp with time zone",
  1264. "primaryKey": false,
  1265. "notNull": false
  1266. },
  1267. "canceled_at": {
  1268. "name": "canceled_at",
  1269. "type": "timestamp with time zone",
  1270. "primaryKey": false,
  1271. "notNull": false
  1272. },
  1273. "created_at": {
  1274. "name": "created_at",
  1275. "type": "timestamp with time zone",
  1276. "primaryKey": false,
  1277. "notNull": true,
  1278. "default": "now()"
  1279. },
  1280. "updated_at": {
  1281. "name": "updated_at",
  1282. "type": "timestamp with time zone",
  1283. "primaryKey": false,
  1284. "notNull": true,
  1285. "default": "now()"
  1286. }
  1287. },
  1288. "indexes": {
  1289. "subscriptions_owner_idx": {
  1290. "name": "subscriptions_owner_idx",
  1291. "columns": [
  1292. {
  1293. "expression": "owner_id",
  1294. "isExpression": false,
  1295. "asc": true,
  1296. "nulls": "last"
  1297. }
  1298. ],
  1299. "isUnique": true,
  1300. "concurrently": false,
  1301. "method": "btree",
  1302. "with": {}
  1303. },
  1304. "subscriptions_polar_idx": {
  1305. "name": "subscriptions_polar_idx",
  1306. "columns": [
  1307. {
  1308. "expression": "polar_subscription_id",
  1309. "isExpression": false,
  1310. "asc": true,
  1311. "nulls": "last"
  1312. }
  1313. ],
  1314. "isUnique": false,
  1315. "concurrently": false,
  1316. "method": "btree",
  1317. "with": {}
  1318. }
  1319. },
  1320. "foreignKeys": {
  1321. "subscriptions_owner_id_users_id_fk": {
  1322. "name": "subscriptions_owner_id_users_id_fk",
  1323. "tableFrom": "subscriptions",
  1324. "tableTo": "users",
  1325. "columnsFrom": ["owner_id"],
  1326. "columnsTo": ["id"],
  1327. "onDelete": "cascade",
  1328. "onUpdate": "no action"
  1329. }
  1330. },
  1331. "compositePrimaryKeys": {},
  1332. "uniqueConstraints": {},
  1333. "policies": {},
  1334. "checkConstraints": {},
  1335. "isRLSEnabled": false
  1336. },
  1337. "public.users": {
  1338. "name": "users",
  1339. "schema": "",
  1340. "columns": {
  1341. "id": {
  1342. "name": "id",
  1343. "type": "text",
  1344. "primaryKey": true,
  1345. "notNull": true
  1346. },
  1347. "email": {
  1348. "name": "email",
  1349. "type": "text",
  1350. "primaryKey": false,
  1351. "notNull": true
  1352. },
  1353. "email_verified": {
  1354. "name": "email_verified",
  1355. "type": "boolean",
  1356. "primaryKey": false,
  1357. "notNull": true,
  1358. "default": false
  1359. },
  1360. "name": {
  1361. "name": "name",
  1362. "type": "text",
  1363. "primaryKey": false,
  1364. "notNull": false
  1365. },
  1366. "image": {
  1367. "name": "image",
  1368. "type": "text",
  1369. "primaryKey": false,
  1370. "notNull": false
  1371. },
  1372. "is_admin": {
  1373. "name": "is_admin",
  1374. "type": "boolean",
  1375. "primaryKey": false,
  1376. "notNull": true,
  1377. "default": false
  1378. },
  1379. "suspended_at": {
  1380. "name": "suspended_at",
  1381. "type": "timestamp with time zone",
  1382. "primaryKey": false,
  1383. "notNull": false
  1384. },
  1385. "legal_name": {
  1386. "name": "legal_name",
  1387. "type": "text",
  1388. "primaryKey": false,
  1389. "notNull": false
  1390. },
  1391. "company_name": {
  1392. "name": "company_name",
  1393. "type": "text",
  1394. "primaryKey": false,
  1395. "notNull": false
  1396. },
  1397. "vat_id": {
  1398. "name": "vat_id",
  1399. "type": "text",
  1400. "primaryKey": false,
  1401. "notNull": false
  1402. },
  1403. "address_line_1": {
  1404. "name": "address_line_1",
  1405. "type": "text",
  1406. "primaryKey": false,
  1407. "notNull": false
  1408. },
  1409. "address_line_2": {
  1410. "name": "address_line_2",
  1411. "type": "text",
  1412. "primaryKey": false,
  1413. "notNull": false
  1414. },
  1415. "address_city": {
  1416. "name": "address_city",
  1417. "type": "text",
  1418. "primaryKey": false,
  1419. "notNull": false
  1420. },
  1421. "address_postal_code": {
  1422. "name": "address_postal_code",
  1423. "type": "text",
  1424. "primaryKey": false,
  1425. "notNull": false
  1426. },
  1427. "address_region": {
  1428. "name": "address_region",
  1429. "type": "text",
  1430. "primaryKey": false,
  1431. "notNull": false
  1432. },
  1433. "address_country": {
  1434. "name": "address_country",
  1435. "type": "text",
  1436. "primaryKey": false,
  1437. "notNull": false
  1438. },
  1439. "created_at": {
  1440. "name": "created_at",
  1441. "type": "timestamp with time zone",
  1442. "primaryKey": false,
  1443. "notNull": true,
  1444. "default": "now()"
  1445. },
  1446. "updated_at": {
  1447. "name": "updated_at",
  1448. "type": "timestamp with time zone",
  1449. "primaryKey": false,
  1450. "notNull": true,
  1451. "default": "now()"
  1452. },
  1453. "deleted_at": {
  1454. "name": "deleted_at",
  1455. "type": "timestamp with time zone",
  1456. "primaryKey": false,
  1457. "notNull": false
  1458. }
  1459. },
  1460. "indexes": {
  1461. "users_email_idx": {
  1462. "name": "users_email_idx",
  1463. "columns": [
  1464. {
  1465. "expression": "email",
  1466. "isExpression": false,
  1467. "asc": true,
  1468. "nulls": "last"
  1469. }
  1470. ],
  1471. "isUnique": true,
  1472. "concurrently": false,
  1473. "method": "btree",
  1474. "with": {}
  1475. }
  1476. },
  1477. "foreignKeys": {},
  1478. "compositePrimaryKeys": {},
  1479. "uniqueConstraints": {},
  1480. "policies": {},
  1481. "checkConstraints": {},
  1482. "isRLSEnabled": false
  1483. },
  1484. "public.verifications": {
  1485. "name": "verifications",
  1486. "schema": "",
  1487. "columns": {
  1488. "id": {
  1489. "name": "id",
  1490. "type": "text",
  1491. "primaryKey": true,
  1492. "notNull": true
  1493. },
  1494. "identifier": {
  1495. "name": "identifier",
  1496. "type": "text",
  1497. "primaryKey": false,
  1498. "notNull": true
  1499. },
  1500. "value": {
  1501. "name": "value",
  1502. "type": "text",
  1503. "primaryKey": false,
  1504. "notNull": true
  1505. },
  1506. "expires_at": {
  1507. "name": "expires_at",
  1508. "type": "timestamp with time zone",
  1509. "primaryKey": false,
  1510. "notNull": true
  1511. },
  1512. "created_at": {
  1513. "name": "created_at",
  1514. "type": "timestamp with time zone",
  1515. "primaryKey": false,
  1516. "notNull": true,
  1517. "default": "now()"
  1518. },
  1519. "updated_at": {
  1520. "name": "updated_at",
  1521. "type": "timestamp with time zone",
  1522. "primaryKey": false,
  1523. "notNull": true,
  1524. "default": "now()"
  1525. }
  1526. },
  1527. "indexes": {
  1528. "verifications_identifier_idx": {
  1529. "name": "verifications_identifier_idx",
  1530. "columns": [
  1531. {
  1532. "expression": "identifier",
  1533. "isExpression": false,
  1534. "asc": true,
  1535. "nulls": "last"
  1536. }
  1537. ],
  1538. "isUnique": false,
  1539. "concurrently": false,
  1540. "method": "btree",
  1541. "with": {}
  1542. }
  1543. },
  1544. "foreignKeys": {},
  1545. "compositePrimaryKeys": {},
  1546. "uniqueConstraints": {},
  1547. "policies": {},
  1548. "checkConstraints": {},
  1549. "isRLSEnabled": false
  1550. }
  1551. },
  1552. "enums": {},
  1553. "schemas": {},
  1554. "sequences": {},
  1555. "roles": {},
  1556. "policies": {},
  1557. "views": {},
  1558. "_meta": {
  1559. "columns": {},
  1560. "schemas": {},
  1561. "tables": {}
  1562. }
  1563. }