0005_snapshot.json 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264
  1. {
  2. "id": "28a85c5e-236f-46f5-a631-333a5a3acda0",
  3. "prevId": "e50b2f30-721e-4665-b308-8bd7faa8d552",
  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.project_env_vars": {
  566. "name": "project_env_vars",
  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. "key": {
  582. "name": "key",
  583. "type": "text",
  584. "primaryKey": false,
  585. "notNull": true
  586. },
  587. "encrypted_value": {
  588. "name": "encrypted_value",
  589. "type": "text",
  590. "primaryKey": false,
  591. "notNull": true
  592. },
  593. "created_by": {
  594. "name": "created_by",
  595. "type": "text",
  596. "primaryKey": false,
  597. "notNull": false
  598. },
  599. "created_at": {
  600. "name": "created_at",
  601. "type": "timestamp with time zone",
  602. "primaryKey": false,
  603. "notNull": true,
  604. "default": "now()"
  605. },
  606. "updated_at": {
  607. "name": "updated_at",
  608. "type": "timestamp with time zone",
  609. "primaryKey": false,
  610. "notNull": true,
  611. "default": "now()"
  612. }
  613. },
  614. "indexes": {
  615. "project_env_vars_project_key_idx": {
  616. "name": "project_env_vars_project_key_idx",
  617. "columns": [
  618. {
  619. "expression": "project_id",
  620. "isExpression": false,
  621. "asc": true,
  622. "nulls": "last"
  623. },
  624. {
  625. "expression": "key",
  626. "isExpression": false,
  627. "asc": true,
  628. "nulls": "last"
  629. }
  630. ],
  631. "isUnique": true,
  632. "concurrently": false,
  633. "method": "btree",
  634. "with": {}
  635. }
  636. },
  637. "foreignKeys": {
  638. "project_env_vars_project_id_projects_id_fk": {
  639. "name": "project_env_vars_project_id_projects_id_fk",
  640. "tableFrom": "project_env_vars",
  641. "tableTo": "projects",
  642. "columnsFrom": ["project_id"],
  643. "columnsTo": ["id"],
  644. "onDelete": "cascade",
  645. "onUpdate": "no action"
  646. },
  647. "project_env_vars_created_by_users_id_fk": {
  648. "name": "project_env_vars_created_by_users_id_fk",
  649. "tableFrom": "project_env_vars",
  650. "tableTo": "users",
  651. "columnsFrom": ["created_by"],
  652. "columnsTo": ["id"],
  653. "onDelete": "no action",
  654. "onUpdate": "no action"
  655. }
  656. },
  657. "compositePrimaryKeys": {},
  658. "uniqueConstraints": {},
  659. "policies": {},
  660. "checkConstraints": {},
  661. "isRLSEnabled": false
  662. },
  663. "public.project_invitations": {
  664. "name": "project_invitations",
  665. "schema": "",
  666. "columns": {
  667. "id": {
  668. "name": "id",
  669. "type": "text",
  670. "primaryKey": true,
  671. "notNull": true
  672. },
  673. "project_id": {
  674. "name": "project_id",
  675. "type": "text",
  676. "primaryKey": false,
  677. "notNull": true
  678. },
  679. "email": {
  680. "name": "email",
  681. "type": "text",
  682. "primaryKey": false,
  683. "notNull": true
  684. },
  685. "role": {
  686. "name": "role",
  687. "type": "text",
  688. "primaryKey": false,
  689. "notNull": true,
  690. "default": "'developer'"
  691. },
  692. "token_hash": {
  693. "name": "token_hash",
  694. "type": "text",
  695. "primaryKey": false,
  696. "notNull": true
  697. },
  698. "invited_by": {
  699. "name": "invited_by",
  700. "type": "text",
  701. "primaryKey": false,
  702. "notNull": false
  703. },
  704. "expires_at": {
  705. "name": "expires_at",
  706. "type": "timestamp with time zone",
  707. "primaryKey": false,
  708. "notNull": true
  709. },
  710. "accepted_at": {
  711. "name": "accepted_at",
  712. "type": "timestamp with time zone",
  713. "primaryKey": false,
  714. "notNull": false
  715. },
  716. "revoked_at": {
  717. "name": "revoked_at",
  718. "type": "timestamp with time zone",
  719. "primaryKey": false,
  720. "notNull": false
  721. },
  722. "created_at": {
  723. "name": "created_at",
  724. "type": "timestamp with time zone",
  725. "primaryKey": false,
  726. "notNull": true,
  727. "default": "now()"
  728. }
  729. },
  730. "indexes": {
  731. "project_invitations_project_email_idx": {
  732. "name": "project_invitations_project_email_idx",
  733. "columns": [
  734. {
  735. "expression": "project_id",
  736. "isExpression": false,
  737. "asc": true,
  738. "nulls": "last"
  739. },
  740. {
  741. "expression": "email",
  742. "isExpression": false,
  743. "asc": true,
  744. "nulls": "last"
  745. }
  746. ],
  747. "isUnique": true,
  748. "concurrently": false,
  749. "method": "btree",
  750. "with": {}
  751. },
  752. "project_invitations_token_idx": {
  753. "name": "project_invitations_token_idx",
  754. "columns": [
  755. {
  756. "expression": "token_hash",
  757. "isExpression": false,
  758. "asc": true,
  759. "nulls": "last"
  760. }
  761. ],
  762. "isUnique": true,
  763. "concurrently": false,
  764. "method": "btree",
  765. "with": {}
  766. }
  767. },
  768. "foreignKeys": {
  769. "project_invitations_project_id_projects_id_fk": {
  770. "name": "project_invitations_project_id_projects_id_fk",
  771. "tableFrom": "project_invitations",
  772. "tableTo": "projects",
  773. "columnsFrom": ["project_id"],
  774. "columnsTo": ["id"],
  775. "onDelete": "cascade",
  776. "onUpdate": "no action"
  777. },
  778. "project_invitations_invited_by_users_id_fk": {
  779. "name": "project_invitations_invited_by_users_id_fk",
  780. "tableFrom": "project_invitations",
  781. "tableTo": "users",
  782. "columnsFrom": ["invited_by"],
  783. "columnsTo": ["id"],
  784. "onDelete": "no action",
  785. "onUpdate": "no action"
  786. }
  787. },
  788. "compositePrimaryKeys": {},
  789. "uniqueConstraints": {},
  790. "policies": {},
  791. "checkConstraints": {},
  792. "isRLSEnabled": false
  793. },
  794. "public.project_members": {
  795. "name": "project_members",
  796. "schema": "",
  797. "columns": {
  798. "project_id": {
  799. "name": "project_id",
  800. "type": "text",
  801. "primaryKey": false,
  802. "notNull": true
  803. },
  804. "user_id": {
  805. "name": "user_id",
  806. "type": "text",
  807. "primaryKey": false,
  808. "notNull": true
  809. },
  810. "role": {
  811. "name": "role",
  812. "type": "text",
  813. "primaryKey": false,
  814. "notNull": true,
  815. "default": "'developer'"
  816. },
  817. "created_at": {
  818. "name": "created_at",
  819. "type": "timestamp with time zone",
  820. "primaryKey": false,
  821. "notNull": true,
  822. "default": "now()"
  823. },
  824. "updated_at": {
  825. "name": "updated_at",
  826. "type": "timestamp with time zone",
  827. "primaryKey": false,
  828. "notNull": true,
  829. "default": "now()"
  830. }
  831. },
  832. "indexes": {},
  833. "foreignKeys": {
  834. "project_members_project_id_projects_id_fk": {
  835. "name": "project_members_project_id_projects_id_fk",
  836. "tableFrom": "project_members",
  837. "tableTo": "projects",
  838. "columnsFrom": ["project_id"],
  839. "columnsTo": ["id"],
  840. "onDelete": "cascade",
  841. "onUpdate": "no action"
  842. },
  843. "project_members_user_id_users_id_fk": {
  844. "name": "project_members_user_id_users_id_fk",
  845. "tableFrom": "project_members",
  846. "tableTo": "users",
  847. "columnsFrom": ["user_id"],
  848. "columnsTo": ["id"],
  849. "onDelete": "cascade",
  850. "onUpdate": "no action"
  851. }
  852. },
  853. "compositePrimaryKeys": {
  854. "project_members_project_id_user_id_pk": {
  855. "name": "project_members_project_id_user_id_pk",
  856. "columns": ["project_id", "user_id"]
  857. }
  858. },
  859. "uniqueConstraints": {},
  860. "policies": {},
  861. "checkConstraints": {},
  862. "isRLSEnabled": false
  863. },
  864. "public.projects": {
  865. "name": "projects",
  866. "schema": "",
  867. "columns": {
  868. "id": {
  869. "name": "id",
  870. "type": "text",
  871. "primaryKey": true,
  872. "notNull": true
  873. },
  874. "slug": {
  875. "name": "slug",
  876. "type": "text",
  877. "primaryKey": false,
  878. "notNull": true
  879. },
  880. "name": {
  881. "name": "name",
  882. "type": "text",
  883. "primaryKey": false,
  884. "notNull": true
  885. },
  886. "owner_id": {
  887. "name": "owner_id",
  888. "type": "text",
  889. "primaryKey": false,
  890. "notNull": true
  891. },
  892. "region": {
  893. "name": "region",
  894. "type": "text",
  895. "primaryKey": false,
  896. "notNull": true,
  897. "default": "'eu-west-1'"
  898. },
  899. "tier": {
  900. "name": "tier",
  901. "type": "text",
  902. "primaryKey": false,
  903. "notNull": true,
  904. "default": "'free'"
  905. },
  906. "shard_id": {
  907. "name": "shard_id",
  908. "type": "text",
  909. "primaryKey": false,
  910. "notNull": false
  911. },
  912. "data_schema_name": {
  913. "name": "data_schema_name",
  914. "type": "text",
  915. "primaryKey": false,
  916. "notNull": false
  917. },
  918. "created_at": {
  919. "name": "created_at",
  920. "type": "timestamp with time zone",
  921. "primaryKey": false,
  922. "notNull": true,
  923. "default": "now()"
  924. },
  925. "updated_at": {
  926. "name": "updated_at",
  927. "type": "timestamp with time zone",
  928. "primaryKey": false,
  929. "notNull": true,
  930. "default": "now()"
  931. },
  932. "deleted_at": {
  933. "name": "deleted_at",
  934. "type": "timestamp with time zone",
  935. "primaryKey": false,
  936. "notNull": false
  937. }
  938. },
  939. "indexes": {
  940. "projects_slug_idx": {
  941. "name": "projects_slug_idx",
  942. "columns": [
  943. {
  944. "expression": "slug",
  945. "isExpression": false,
  946. "asc": true,
  947. "nulls": "last"
  948. }
  949. ],
  950. "isUnique": true,
  951. "concurrently": false,
  952. "method": "btree",
  953. "with": {}
  954. },
  955. "projects_owner_idx": {
  956. "name": "projects_owner_idx",
  957. "columns": [
  958. {
  959. "expression": "owner_id",
  960. "isExpression": false,
  961. "asc": true,
  962. "nulls": "last"
  963. }
  964. ],
  965. "isUnique": false,
  966. "concurrently": false,
  967. "method": "btree",
  968. "with": {}
  969. }
  970. },
  971. "foreignKeys": {
  972. "projects_owner_id_users_id_fk": {
  973. "name": "projects_owner_id_users_id_fk",
  974. "tableFrom": "projects",
  975. "tableTo": "users",
  976. "columnsFrom": ["owner_id"],
  977. "columnsTo": ["id"],
  978. "onDelete": "no action",
  979. "onUpdate": "no action"
  980. }
  981. },
  982. "compositePrimaryKeys": {},
  983. "uniqueConstraints": {},
  984. "policies": {},
  985. "checkConstraints": {},
  986. "isRLSEnabled": false
  987. },
  988. "public.sessions": {
  989. "name": "sessions",
  990. "schema": "",
  991. "columns": {
  992. "id": {
  993. "name": "id",
  994. "type": "text",
  995. "primaryKey": true,
  996. "notNull": true
  997. },
  998. "user_id": {
  999. "name": "user_id",
  1000. "type": "text",
  1001. "primaryKey": false,
  1002. "notNull": true
  1003. },
  1004. "token": {
  1005. "name": "token",
  1006. "type": "text",
  1007. "primaryKey": false,
  1008. "notNull": true
  1009. },
  1010. "expires_at": {
  1011. "name": "expires_at",
  1012. "type": "timestamp with time zone",
  1013. "primaryKey": false,
  1014. "notNull": true
  1015. },
  1016. "ip_address": {
  1017. "name": "ip_address",
  1018. "type": "text",
  1019. "primaryKey": false,
  1020. "notNull": false
  1021. },
  1022. "user_agent": {
  1023. "name": "user_agent",
  1024. "type": "text",
  1025. "primaryKey": false,
  1026. "notNull": false
  1027. },
  1028. "created_at": {
  1029. "name": "created_at",
  1030. "type": "timestamp with time zone",
  1031. "primaryKey": false,
  1032. "notNull": true,
  1033. "default": "now()"
  1034. },
  1035. "updated_at": {
  1036. "name": "updated_at",
  1037. "type": "timestamp with time zone",
  1038. "primaryKey": false,
  1039. "notNull": true,
  1040. "default": "now()"
  1041. }
  1042. },
  1043. "indexes": {
  1044. "sessions_token_idx": {
  1045. "name": "sessions_token_idx",
  1046. "columns": [
  1047. {
  1048. "expression": "token",
  1049. "isExpression": false,
  1050. "asc": true,
  1051. "nulls": "last"
  1052. }
  1053. ],
  1054. "isUnique": true,
  1055. "concurrently": false,
  1056. "method": "btree",
  1057. "with": {}
  1058. },
  1059. "sessions_user_id_idx": {
  1060. "name": "sessions_user_id_idx",
  1061. "columns": [
  1062. {
  1063. "expression": "user_id",
  1064. "isExpression": false,
  1065. "asc": true,
  1066. "nulls": "last"
  1067. }
  1068. ],
  1069. "isUnique": false,
  1070. "concurrently": false,
  1071. "method": "btree",
  1072. "with": {}
  1073. }
  1074. },
  1075. "foreignKeys": {
  1076. "sessions_user_id_users_id_fk": {
  1077. "name": "sessions_user_id_users_id_fk",
  1078. "tableFrom": "sessions",
  1079. "tableTo": "users",
  1080. "columnsFrom": ["user_id"],
  1081. "columnsTo": ["id"],
  1082. "onDelete": "cascade",
  1083. "onUpdate": "no action"
  1084. }
  1085. },
  1086. "compositePrimaryKeys": {},
  1087. "uniqueConstraints": {},
  1088. "policies": {},
  1089. "checkConstraints": {},
  1090. "isRLSEnabled": false
  1091. },
  1092. "public.users": {
  1093. "name": "users",
  1094. "schema": "",
  1095. "columns": {
  1096. "id": {
  1097. "name": "id",
  1098. "type": "text",
  1099. "primaryKey": true,
  1100. "notNull": true
  1101. },
  1102. "email": {
  1103. "name": "email",
  1104. "type": "text",
  1105. "primaryKey": false,
  1106. "notNull": true
  1107. },
  1108. "email_verified": {
  1109. "name": "email_verified",
  1110. "type": "boolean",
  1111. "primaryKey": false,
  1112. "notNull": true,
  1113. "default": false
  1114. },
  1115. "name": {
  1116. "name": "name",
  1117. "type": "text",
  1118. "primaryKey": false,
  1119. "notNull": false
  1120. },
  1121. "image": {
  1122. "name": "image",
  1123. "type": "text",
  1124. "primaryKey": false,
  1125. "notNull": false
  1126. },
  1127. "is_admin": {
  1128. "name": "is_admin",
  1129. "type": "boolean",
  1130. "primaryKey": false,
  1131. "notNull": true,
  1132. "default": false
  1133. },
  1134. "suspended_at": {
  1135. "name": "suspended_at",
  1136. "type": "timestamp with time zone",
  1137. "primaryKey": false,
  1138. "notNull": false
  1139. },
  1140. "created_at": {
  1141. "name": "created_at",
  1142. "type": "timestamp with time zone",
  1143. "primaryKey": false,
  1144. "notNull": true,
  1145. "default": "now()"
  1146. },
  1147. "updated_at": {
  1148. "name": "updated_at",
  1149. "type": "timestamp with time zone",
  1150. "primaryKey": false,
  1151. "notNull": true,
  1152. "default": "now()"
  1153. },
  1154. "deleted_at": {
  1155. "name": "deleted_at",
  1156. "type": "timestamp with time zone",
  1157. "primaryKey": false,
  1158. "notNull": false
  1159. }
  1160. },
  1161. "indexes": {
  1162. "users_email_idx": {
  1163. "name": "users_email_idx",
  1164. "columns": [
  1165. {
  1166. "expression": "email",
  1167. "isExpression": false,
  1168. "asc": true,
  1169. "nulls": "last"
  1170. }
  1171. ],
  1172. "isUnique": true,
  1173. "concurrently": false,
  1174. "method": "btree",
  1175. "with": {}
  1176. }
  1177. },
  1178. "foreignKeys": {},
  1179. "compositePrimaryKeys": {},
  1180. "uniqueConstraints": {},
  1181. "policies": {},
  1182. "checkConstraints": {},
  1183. "isRLSEnabled": false
  1184. },
  1185. "public.verifications": {
  1186. "name": "verifications",
  1187. "schema": "",
  1188. "columns": {
  1189. "id": {
  1190. "name": "id",
  1191. "type": "text",
  1192. "primaryKey": true,
  1193. "notNull": true
  1194. },
  1195. "identifier": {
  1196. "name": "identifier",
  1197. "type": "text",
  1198. "primaryKey": false,
  1199. "notNull": true
  1200. },
  1201. "value": {
  1202. "name": "value",
  1203. "type": "text",
  1204. "primaryKey": false,
  1205. "notNull": true
  1206. },
  1207. "expires_at": {
  1208. "name": "expires_at",
  1209. "type": "timestamp with time zone",
  1210. "primaryKey": false,
  1211. "notNull": true
  1212. },
  1213. "created_at": {
  1214. "name": "created_at",
  1215. "type": "timestamp with time zone",
  1216. "primaryKey": false,
  1217. "notNull": true,
  1218. "default": "now()"
  1219. },
  1220. "updated_at": {
  1221. "name": "updated_at",
  1222. "type": "timestamp with time zone",
  1223. "primaryKey": false,
  1224. "notNull": true,
  1225. "default": "now()"
  1226. }
  1227. },
  1228. "indexes": {
  1229. "verifications_identifier_idx": {
  1230. "name": "verifications_identifier_idx",
  1231. "columns": [
  1232. {
  1233. "expression": "identifier",
  1234. "isExpression": false,
  1235. "asc": true,
  1236. "nulls": "last"
  1237. }
  1238. ],
  1239. "isUnique": false,
  1240. "concurrently": false,
  1241. "method": "btree",
  1242. "with": {}
  1243. }
  1244. },
  1245. "foreignKeys": {},
  1246. "compositePrimaryKeys": {},
  1247. "uniqueConstraints": {},
  1248. "policies": {},
  1249. "checkConstraints": {},
  1250. "isRLSEnabled": false
  1251. }
  1252. },
  1253. "enums": {},
  1254. "schemas": {},
  1255. "sequences": {},
  1256. "roles": {},
  1257. "policies": {},
  1258. "views": {},
  1259. "_meta": {
  1260. "columns": {},
  1261. "schemas": {},
  1262. "tables": {}
  1263. }
  1264. }