0009_snapshot.json1569 lines · main
1{
2 "id": "e8624e0d-8098-400f-8941-093cd58dbc5c",
3 "prevId": "b6c2f395-ec3b-49a6-ba33-e9c6cd31a407",
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 "vat_verified_at": {
1404 "name": "vat_verified_at",
1405 "type": "timestamp with time zone",
1406 "primaryKey": false,
1407 "notNull": false
1408 },
1409 "address_line_1": {
1410 "name": "address_line_1",
1411 "type": "text",
1412 "primaryKey": false,
1413 "notNull": false
1414 },
1415 "address_line_2": {
1416 "name": "address_line_2",
1417 "type": "text",
1418 "primaryKey": false,
1419 "notNull": false
1420 },
1421 "address_city": {
1422 "name": "address_city",
1423 "type": "text",
1424 "primaryKey": false,
1425 "notNull": false
1426 },
1427 "address_postal_code": {
1428 "name": "address_postal_code",
1429 "type": "text",
1430 "primaryKey": false,
1431 "notNull": false
1432 },
1433 "address_region": {
1434 "name": "address_region",
1435 "type": "text",
1436 "primaryKey": false,
1437 "notNull": false
1438 },
1439 "address_country": {
1440 "name": "address_country",
1441 "type": "text",
1442 "primaryKey": false,
1443 "notNull": false
1444 },
1445 "created_at": {
1446 "name": "created_at",
1447 "type": "timestamp with time zone",
1448 "primaryKey": false,
1449 "notNull": true,
1450 "default": "now()"
1451 },
1452 "updated_at": {
1453 "name": "updated_at",
1454 "type": "timestamp with time zone",
1455 "primaryKey": false,
1456 "notNull": true,
1457 "default": "now()"
1458 },
1459 "deleted_at": {
1460 "name": "deleted_at",
1461 "type": "timestamp with time zone",
1462 "primaryKey": false,
1463 "notNull": false
1464 }
1465 },
1466 "indexes": {
1467 "users_email_idx": {
1468 "name": "users_email_idx",
1469 "columns": [
1470 {
1471 "expression": "email",
1472 "isExpression": false,
1473 "asc": true,
1474 "nulls": "last"
1475 }
1476 ],
1477 "isUnique": true,
1478 "concurrently": false,
1479 "method": "btree",
1480 "with": {}
1481 }
1482 },
1483 "foreignKeys": {},
1484 "compositePrimaryKeys": {},
1485 "uniqueConstraints": {},
1486 "policies": {},
1487 "checkConstraints": {},
1488 "isRLSEnabled": false
1489 },
1490 "public.verifications": {
1491 "name": "verifications",
1492 "schema": "",
1493 "columns": {
1494 "id": {
1495 "name": "id",
1496 "type": "text",
1497 "primaryKey": true,
1498 "notNull": true
1499 },
1500 "identifier": {
1501 "name": "identifier",
1502 "type": "text",
1503 "primaryKey": false,
1504 "notNull": true
1505 },
1506 "value": {
1507 "name": "value",
1508 "type": "text",
1509 "primaryKey": false,
1510 "notNull": true
1511 },
1512 "expires_at": {
1513 "name": "expires_at",
1514 "type": "timestamp with time zone",
1515 "primaryKey": false,
1516 "notNull": true
1517 },
1518 "created_at": {
1519 "name": "created_at",
1520 "type": "timestamp with time zone",
1521 "primaryKey": false,
1522 "notNull": true,
1523 "default": "now()"
1524 },
1525 "updated_at": {
1526 "name": "updated_at",
1527 "type": "timestamp with time zone",
1528 "primaryKey": false,
1529 "notNull": true,
1530 "default": "now()"
1531 }
1532 },
1533 "indexes": {
1534 "verifications_identifier_idx": {
1535 "name": "verifications_identifier_idx",
1536 "columns": [
1537 {
1538 "expression": "identifier",
1539 "isExpression": false,
1540 "asc": true,
1541 "nulls": "last"
1542 }
1543 ],
1544 "isUnique": false,
1545 "concurrently": false,
1546 "method": "btree",
1547 "with": {}
1548 }
1549 },
1550 "foreignKeys": {},
1551 "compositePrimaryKeys": {},
1552 "uniqueConstraints": {},
1553 "policies": {},
1554 "checkConstraints": {},
1555 "isRLSEnabled": false
1556 }
1557 },
1558 "enums": {},
1559 "schemas": {},
1560 "sequences": {},
1561 "roles": {},
1562 "policies": {},
1563 "views": {},
1564 "_meta": {
1565 "columns": {},
1566 "schemas": {},
1567 "tables": {}
1568 }
1569}