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