0007_snapshot.json 37 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436
  1. {
  2. "id": "794ed447-fba9-4717-ac3d-db0c1b7ca36f",
  3. "prevId": "2c2b9773-17a1-48cd-b156-21c371b91a75",
  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.subscriptions": {
  1093. "name": "subscriptions",
  1094. "schema": "",
  1095. "columns": {
  1096. "id": {
  1097. "name": "id",
  1098. "type": "text",
  1099. "primaryKey": true,
  1100. "notNull": true
  1101. },
  1102. "owner_id": {
  1103. "name": "owner_id",
  1104. "type": "text",
  1105. "primaryKey": false,
  1106. "notNull": true
  1107. },
  1108. "polar_subscription_id": {
  1109. "name": "polar_subscription_id",
  1110. "type": "text",
  1111. "primaryKey": false,
  1112. "notNull": false
  1113. },
  1114. "polar_customer_id": {
  1115. "name": "polar_customer_id",
  1116. "type": "text",
  1117. "primaryKey": false,
  1118. "notNull": false
  1119. },
  1120. "tier": {
  1121. "name": "tier",
  1122. "type": "text",
  1123. "primaryKey": false,
  1124. "notNull": true,
  1125. "default": "'free'"
  1126. },
  1127. "status": {
  1128. "name": "status",
  1129. "type": "text",
  1130. "primaryKey": false,
  1131. "notNull": true,
  1132. "default": "'active'"
  1133. },
  1134. "current_period_end": {
  1135. "name": "current_period_end",
  1136. "type": "timestamp with time zone",
  1137. "primaryKey": false,
  1138. "notNull": false
  1139. },
  1140. "canceled_at": {
  1141. "name": "canceled_at",
  1142. "type": "timestamp with time zone",
  1143. "primaryKey": false,
  1144. "notNull": false
  1145. },
  1146. "created_at": {
  1147. "name": "created_at",
  1148. "type": "timestamp with time zone",
  1149. "primaryKey": false,
  1150. "notNull": true,
  1151. "default": "now()"
  1152. },
  1153. "updated_at": {
  1154. "name": "updated_at",
  1155. "type": "timestamp with time zone",
  1156. "primaryKey": false,
  1157. "notNull": true,
  1158. "default": "now()"
  1159. }
  1160. },
  1161. "indexes": {
  1162. "subscriptions_owner_idx": {
  1163. "name": "subscriptions_owner_idx",
  1164. "columns": [
  1165. {
  1166. "expression": "owner_id",
  1167. "isExpression": false,
  1168. "asc": true,
  1169. "nulls": "last"
  1170. }
  1171. ],
  1172. "isUnique": true,
  1173. "concurrently": false,
  1174. "method": "btree",
  1175. "with": {}
  1176. },
  1177. "subscriptions_polar_idx": {
  1178. "name": "subscriptions_polar_idx",
  1179. "columns": [
  1180. {
  1181. "expression": "polar_subscription_id",
  1182. "isExpression": false,
  1183. "asc": true,
  1184. "nulls": "last"
  1185. }
  1186. ],
  1187. "isUnique": false,
  1188. "concurrently": false,
  1189. "method": "btree",
  1190. "with": {}
  1191. }
  1192. },
  1193. "foreignKeys": {
  1194. "subscriptions_owner_id_users_id_fk": {
  1195. "name": "subscriptions_owner_id_users_id_fk",
  1196. "tableFrom": "subscriptions",
  1197. "tableTo": "users",
  1198. "columnsFrom": ["owner_id"],
  1199. "columnsTo": ["id"],
  1200. "onDelete": "cascade",
  1201. "onUpdate": "no action"
  1202. }
  1203. },
  1204. "compositePrimaryKeys": {},
  1205. "uniqueConstraints": {},
  1206. "policies": {},
  1207. "checkConstraints": {},
  1208. "isRLSEnabled": false
  1209. },
  1210. "public.users": {
  1211. "name": "users",
  1212. "schema": "",
  1213. "columns": {
  1214. "id": {
  1215. "name": "id",
  1216. "type": "text",
  1217. "primaryKey": true,
  1218. "notNull": true
  1219. },
  1220. "email": {
  1221. "name": "email",
  1222. "type": "text",
  1223. "primaryKey": false,
  1224. "notNull": true
  1225. },
  1226. "email_verified": {
  1227. "name": "email_verified",
  1228. "type": "boolean",
  1229. "primaryKey": false,
  1230. "notNull": true,
  1231. "default": false
  1232. },
  1233. "name": {
  1234. "name": "name",
  1235. "type": "text",
  1236. "primaryKey": false,
  1237. "notNull": false
  1238. },
  1239. "image": {
  1240. "name": "image",
  1241. "type": "text",
  1242. "primaryKey": false,
  1243. "notNull": false
  1244. },
  1245. "is_admin": {
  1246. "name": "is_admin",
  1247. "type": "boolean",
  1248. "primaryKey": false,
  1249. "notNull": true,
  1250. "default": false
  1251. },
  1252. "suspended_at": {
  1253. "name": "suspended_at",
  1254. "type": "timestamp with time zone",
  1255. "primaryKey": false,
  1256. "notNull": false
  1257. },
  1258. "legal_name": {
  1259. "name": "legal_name",
  1260. "type": "text",
  1261. "primaryKey": false,
  1262. "notNull": false
  1263. },
  1264. "company_name": {
  1265. "name": "company_name",
  1266. "type": "text",
  1267. "primaryKey": false,
  1268. "notNull": false
  1269. },
  1270. "vat_id": {
  1271. "name": "vat_id",
  1272. "type": "text",
  1273. "primaryKey": false,
  1274. "notNull": false
  1275. },
  1276. "address_line_1": {
  1277. "name": "address_line_1",
  1278. "type": "text",
  1279. "primaryKey": false,
  1280. "notNull": false
  1281. },
  1282. "address_line_2": {
  1283. "name": "address_line_2",
  1284. "type": "text",
  1285. "primaryKey": false,
  1286. "notNull": false
  1287. },
  1288. "address_city": {
  1289. "name": "address_city",
  1290. "type": "text",
  1291. "primaryKey": false,
  1292. "notNull": false
  1293. },
  1294. "address_postal_code": {
  1295. "name": "address_postal_code",
  1296. "type": "text",
  1297. "primaryKey": false,
  1298. "notNull": false
  1299. },
  1300. "address_region": {
  1301. "name": "address_region",
  1302. "type": "text",
  1303. "primaryKey": false,
  1304. "notNull": false
  1305. },
  1306. "address_country": {
  1307. "name": "address_country",
  1308. "type": "text",
  1309. "primaryKey": false,
  1310. "notNull": false
  1311. },
  1312. "created_at": {
  1313. "name": "created_at",
  1314. "type": "timestamp with time zone",
  1315. "primaryKey": false,
  1316. "notNull": true,
  1317. "default": "now()"
  1318. },
  1319. "updated_at": {
  1320. "name": "updated_at",
  1321. "type": "timestamp with time zone",
  1322. "primaryKey": false,
  1323. "notNull": true,
  1324. "default": "now()"
  1325. },
  1326. "deleted_at": {
  1327. "name": "deleted_at",
  1328. "type": "timestamp with time zone",
  1329. "primaryKey": false,
  1330. "notNull": false
  1331. }
  1332. },
  1333. "indexes": {
  1334. "users_email_idx": {
  1335. "name": "users_email_idx",
  1336. "columns": [
  1337. {
  1338. "expression": "email",
  1339. "isExpression": false,
  1340. "asc": true,
  1341. "nulls": "last"
  1342. }
  1343. ],
  1344. "isUnique": true,
  1345. "concurrently": false,
  1346. "method": "btree",
  1347. "with": {}
  1348. }
  1349. },
  1350. "foreignKeys": {},
  1351. "compositePrimaryKeys": {},
  1352. "uniqueConstraints": {},
  1353. "policies": {},
  1354. "checkConstraints": {},
  1355. "isRLSEnabled": false
  1356. },
  1357. "public.verifications": {
  1358. "name": "verifications",
  1359. "schema": "",
  1360. "columns": {
  1361. "id": {
  1362. "name": "id",
  1363. "type": "text",
  1364. "primaryKey": true,
  1365. "notNull": true
  1366. },
  1367. "identifier": {
  1368. "name": "identifier",
  1369. "type": "text",
  1370. "primaryKey": false,
  1371. "notNull": true
  1372. },
  1373. "value": {
  1374. "name": "value",
  1375. "type": "text",
  1376. "primaryKey": false,
  1377. "notNull": true
  1378. },
  1379. "expires_at": {
  1380. "name": "expires_at",
  1381. "type": "timestamp with time zone",
  1382. "primaryKey": false,
  1383. "notNull": true
  1384. },
  1385. "created_at": {
  1386. "name": "created_at",
  1387. "type": "timestamp with time zone",
  1388. "primaryKey": false,
  1389. "notNull": true,
  1390. "default": "now()"
  1391. },
  1392. "updated_at": {
  1393. "name": "updated_at",
  1394. "type": "timestamp with time zone",
  1395. "primaryKey": false,
  1396. "notNull": true,
  1397. "default": "now()"
  1398. }
  1399. },
  1400. "indexes": {
  1401. "verifications_identifier_idx": {
  1402. "name": "verifications_identifier_idx",
  1403. "columns": [
  1404. {
  1405. "expression": "identifier",
  1406. "isExpression": false,
  1407. "asc": true,
  1408. "nulls": "last"
  1409. }
  1410. ],
  1411. "isUnique": false,
  1412. "concurrently": false,
  1413. "method": "btree",
  1414. "with": {}
  1415. }
  1416. },
  1417. "foreignKeys": {},
  1418. "compositePrimaryKeys": {},
  1419. "uniqueConstraints": {},
  1420. "policies": {},
  1421. "checkConstraints": {},
  1422. "isRLSEnabled": false
  1423. }
  1424. },
  1425. "enums": {},
  1426. "schemas": {},
  1427. "sequences": {},
  1428. "roles": {},
  1429. "policies": {},
  1430. "views": {},
  1431. "_meta": {
  1432. "columns": {},
  1433. "schemas": {},
  1434. "tables": {}
  1435. }
  1436. }