Openstatus www.openstatus.dev
at main 996 lines 28 kB view raw
1{ 2 "version": "6", 3 "dialect": "sqlite", 4 "tables": { 5 "incident": { 6 "name": "incident", 7 "columns": { 8 "id": { 9 "name": "id", 10 "type": "integer", 11 "primaryKey": true, 12 "notNull": true, 13 "autoincrement": false 14 }, 15 "status": { 16 "name": "status", 17 "type": "text", 18 "primaryKey": false, 19 "notNull": true, 20 "autoincrement": false 21 }, 22 "title": { 23 "name": "title", 24 "type": "text(256)", 25 "primaryKey": false, 26 "notNull": true, 27 "autoincrement": false 28 }, 29 "workspace_id": { 30 "name": "workspace_id", 31 "type": "integer", 32 "primaryKey": false, 33 "notNull": false, 34 "autoincrement": false 35 }, 36 "created_at": { 37 "name": "created_at", 38 "type": "integer", 39 "primaryKey": false, 40 "notNull": false, 41 "autoincrement": false, 42 "default": "(strftime('%s', 'now'))" 43 }, 44 "updated_at": { 45 "name": "updated_at", 46 "type": "integer", 47 "primaryKey": false, 48 "notNull": false, 49 "autoincrement": false, 50 "default": "(strftime('%s', 'now'))" 51 } 52 }, 53 "indexes": {}, 54 "foreignKeys": { 55 "incident_workspace_id_workspace_id_fk": { 56 "name": "incident_workspace_id_workspace_id_fk", 57 "tableFrom": "incident", 58 "columnsFrom": ["workspace_id"], 59 "tableTo": "workspace", 60 "columnsTo": ["id"], 61 "onUpdate": "no action", 62 "onDelete": "no action" 63 } 64 }, 65 "compositePrimaryKeys": {}, 66 "uniqueConstraints": {} 67 }, 68 "incident_update": { 69 "name": "incident_update", 70 "columns": { 71 "id": { 72 "name": "id", 73 "type": "integer", 74 "primaryKey": true, 75 "notNull": true, 76 "autoincrement": false 77 }, 78 "status": { 79 "name": "status", 80 "type": "text(4)", 81 "primaryKey": false, 82 "notNull": true, 83 "autoincrement": false 84 }, 85 "date": { 86 "name": "date", 87 "type": "integer", 88 "primaryKey": false, 89 "notNull": true, 90 "autoincrement": false 91 }, 92 "message": { 93 "name": "message", 94 "type": "text", 95 "primaryKey": false, 96 "notNull": true, 97 "autoincrement": false 98 }, 99 "incident_id": { 100 "name": "incident_id", 101 "type": "integer", 102 "primaryKey": false, 103 "notNull": true, 104 "autoincrement": false 105 }, 106 "created_at": { 107 "name": "created_at", 108 "type": "integer", 109 "primaryKey": false, 110 "notNull": false, 111 "autoincrement": false, 112 "default": "(strftime('%s', 'now'))" 113 }, 114 "updated_at": { 115 "name": "updated_at", 116 "type": "integer", 117 "primaryKey": false, 118 "notNull": false, 119 "autoincrement": false, 120 "default": "(strftime('%s', 'now'))" 121 } 122 }, 123 "indexes": {}, 124 "foreignKeys": { 125 "incident_update_incident_id_incident_id_fk": { 126 "name": "incident_update_incident_id_incident_id_fk", 127 "tableFrom": "incident_update", 128 "columnsFrom": ["incident_id"], 129 "tableTo": "incident", 130 "columnsTo": ["id"], 131 "onUpdate": "no action", 132 "onDelete": "cascade" 133 } 134 }, 135 "compositePrimaryKeys": {}, 136 "uniqueConstraints": {} 137 }, 138 "incidents_to_monitors": { 139 "name": "incidents_to_monitors", 140 "columns": { 141 "monitor_id": { 142 "name": "monitor_id", 143 "type": "integer", 144 "primaryKey": false, 145 "notNull": true, 146 "autoincrement": false 147 }, 148 "incident_id": { 149 "name": "incident_id", 150 "type": "integer", 151 "primaryKey": false, 152 "notNull": true, 153 "autoincrement": false 154 } 155 }, 156 "indexes": {}, 157 "foreignKeys": { 158 "incidents_to_monitors_monitor_id_monitor_id_fk": { 159 "name": "incidents_to_monitors_monitor_id_monitor_id_fk", 160 "tableFrom": "incidents_to_monitors", 161 "columnsFrom": ["monitor_id"], 162 "tableTo": "monitor", 163 "columnsTo": ["id"], 164 "onUpdate": "no action", 165 "onDelete": "cascade" 166 }, 167 "incidents_to_monitors_incident_id_incident_id_fk": { 168 "name": "incidents_to_monitors_incident_id_incident_id_fk", 169 "tableFrom": "incidents_to_monitors", 170 "columnsFrom": ["incident_id"], 171 "tableTo": "incident", 172 "columnsTo": ["id"], 173 "onUpdate": "no action", 174 "onDelete": "cascade" 175 } 176 }, 177 "compositePrimaryKeys": { 178 "incidents_to_monitors_monitor_id_incident_id_pk": { 179 "columns": ["incident_id", "monitor_id"] 180 } 181 }, 182 "uniqueConstraints": {} 183 }, 184 "incidents_to_pages": { 185 "name": "incidents_to_pages", 186 "columns": { 187 "page_id": { 188 "name": "page_id", 189 "type": "integer", 190 "primaryKey": false, 191 "notNull": true, 192 "autoincrement": false 193 }, 194 "incident_id": { 195 "name": "incident_id", 196 "type": "integer", 197 "primaryKey": false, 198 "notNull": true, 199 "autoincrement": false 200 } 201 }, 202 "indexes": {}, 203 "foreignKeys": { 204 "incidents_to_pages_page_id_page_id_fk": { 205 "name": "incidents_to_pages_page_id_page_id_fk", 206 "tableFrom": "incidents_to_pages", 207 "columnsFrom": ["page_id"], 208 "tableTo": "page", 209 "columnsTo": ["id"], 210 "onUpdate": "no action", 211 "onDelete": "cascade" 212 }, 213 "incidents_to_pages_incident_id_incident_id_fk": { 214 "name": "incidents_to_pages_incident_id_incident_id_fk", 215 "tableFrom": "incidents_to_pages", 216 "columnsFrom": ["incident_id"], 217 "tableTo": "incident", 218 "columnsTo": ["id"], 219 "onUpdate": "no action", 220 "onDelete": "cascade" 221 } 222 }, 223 "compositePrimaryKeys": { 224 "incidents_to_pages_page_id_incident_id_pk": { 225 "columns": ["incident_id", "page_id"] 226 } 227 }, 228 "uniqueConstraints": {} 229 }, 230 "integration": { 231 "name": "integration", 232 "columns": { 233 "id": { 234 "name": "id", 235 "type": "integer", 236 "primaryKey": true, 237 "notNull": true, 238 "autoincrement": false 239 }, 240 "name": { 241 "name": "name", 242 "type": "text(256)", 243 "primaryKey": false, 244 "notNull": true, 245 "autoincrement": false 246 }, 247 "workspace_id": { 248 "name": "workspace_id", 249 "type": "integer", 250 "primaryKey": false, 251 "notNull": false, 252 "autoincrement": false 253 }, 254 "credential": { 255 "name": "credential", 256 "type": "text", 257 "primaryKey": false, 258 "notNull": false, 259 "autoincrement": false 260 }, 261 "external_id": { 262 "name": "external_id", 263 "type": "text", 264 "primaryKey": false, 265 "notNull": true, 266 "autoincrement": false 267 }, 268 "created_at": { 269 "name": "created_at", 270 "type": "integer", 271 "primaryKey": false, 272 "notNull": false, 273 "autoincrement": false, 274 "default": "(strftime('%s', 'now'))" 275 }, 276 "updated_at": { 277 "name": "updated_at", 278 "type": "integer", 279 "primaryKey": false, 280 "notNull": false, 281 "autoincrement": false, 282 "default": "(strftime('%s', 'now'))" 283 }, 284 "data": { 285 "name": "data", 286 "type": "text", 287 "primaryKey": false, 288 "notNull": true, 289 "autoincrement": false 290 } 291 }, 292 "indexes": {}, 293 "foreignKeys": { 294 "integration_workspace_id_workspace_id_fk": { 295 "name": "integration_workspace_id_workspace_id_fk", 296 "tableFrom": "integration", 297 "columnsFrom": ["workspace_id"], 298 "tableTo": "workspace", 299 "columnsTo": ["id"], 300 "onUpdate": "no action", 301 "onDelete": "no action" 302 } 303 }, 304 "compositePrimaryKeys": {}, 305 "uniqueConstraints": {} 306 }, 307 "page": { 308 "name": "page", 309 "columns": { 310 "id": { 311 "name": "id", 312 "type": "integer", 313 "primaryKey": true, 314 "notNull": true, 315 "autoincrement": false 316 }, 317 "workspace_id": { 318 "name": "workspace_id", 319 "type": "integer", 320 "primaryKey": false, 321 "notNull": true, 322 "autoincrement": false 323 }, 324 "title": { 325 "name": "title", 326 "type": "text", 327 "primaryKey": false, 328 "notNull": true, 329 "autoincrement": false 330 }, 331 "description": { 332 "name": "description", 333 "type": "text", 334 "primaryKey": false, 335 "notNull": true, 336 "autoincrement": false 337 }, 338 "icon": { 339 "name": "icon", 340 "type": "text(256)", 341 "primaryKey": false, 342 "notNull": false, 343 "autoincrement": false, 344 "default": "''" 345 }, 346 "slug": { 347 "name": "slug", 348 "type": "text(256)", 349 "primaryKey": false, 350 "notNull": true, 351 "autoincrement": false 352 }, 353 "custom_domain": { 354 "name": "custom_domain", 355 "type": "text(256)", 356 "primaryKey": false, 357 "notNull": true, 358 "autoincrement": false 359 }, 360 "published": { 361 "name": "published", 362 "type": "integer", 363 "primaryKey": false, 364 "notNull": false, 365 "autoincrement": false, 366 "default": false 367 }, 368 "created_at": { 369 "name": "created_at", 370 "type": "integer", 371 "primaryKey": false, 372 "notNull": false, 373 "autoincrement": false, 374 "default": "(strftime('%s', 'now'))" 375 }, 376 "updated_at": { 377 "name": "updated_at", 378 "type": "integer", 379 "primaryKey": false, 380 "notNull": false, 381 "autoincrement": false, 382 "default": "(strftime('%s', 'now'))" 383 } 384 }, 385 "indexes": { 386 "page_slug_unique": { 387 "name": "page_slug_unique", 388 "columns": ["slug"], 389 "isUnique": true 390 } 391 }, 392 "foreignKeys": { 393 "page_workspace_id_workspace_id_fk": { 394 "name": "page_workspace_id_workspace_id_fk", 395 "tableFrom": "page", 396 "columnsFrom": ["workspace_id"], 397 "tableTo": "workspace", 398 "columnsTo": ["id"], 399 "onUpdate": "no action", 400 "onDelete": "cascade" 401 } 402 }, 403 "compositePrimaryKeys": {}, 404 "uniqueConstraints": {} 405 }, 406 "monitor": { 407 "name": "monitor", 408 "columns": { 409 "id": { 410 "name": "id", 411 "type": "integer", 412 "primaryKey": true, 413 "notNull": true, 414 "autoincrement": false 415 }, 416 "job_type": { 417 "name": "job_type", 418 "type": "text", 419 "primaryKey": false, 420 "notNull": true, 421 "autoincrement": false, 422 "default": "'other'" 423 }, 424 "periodicity": { 425 "name": "periodicity", 426 "type": "text", 427 "primaryKey": false, 428 "notNull": true, 429 "autoincrement": false, 430 "default": "'other'" 431 }, 432 "status": { 433 "name": "status", 434 "type": "text", 435 "primaryKey": false, 436 "notNull": true, 437 "autoincrement": false, 438 "default": "'active'" 439 }, 440 "active": { 441 "name": "active", 442 "type": "integer", 443 "primaryKey": false, 444 "notNull": false, 445 "autoincrement": false, 446 "default": false 447 }, 448 "regions": { 449 "name": "regions", 450 "type": "text", 451 "primaryKey": false, 452 "notNull": true, 453 "autoincrement": false, 454 "default": "''" 455 }, 456 "url": { 457 "name": "url", 458 "type": "text(2048)", 459 "primaryKey": false, 460 "notNull": true, 461 "autoincrement": false 462 }, 463 "name": { 464 "name": "name", 465 "type": "text(256)", 466 "primaryKey": false, 467 "notNull": true, 468 "autoincrement": false, 469 "default": "''" 470 }, 471 "description": { 472 "name": "description", 473 "type": "text", 474 "primaryKey": false, 475 "notNull": true, 476 "autoincrement": false, 477 "default": "''" 478 }, 479 "headers": { 480 "name": "headers", 481 "type": "text", 482 "primaryKey": false, 483 "notNull": false, 484 "autoincrement": false, 485 "default": "''" 486 }, 487 "body": { 488 "name": "body", 489 "type": "text", 490 "primaryKey": false, 491 "notNull": false, 492 "autoincrement": false, 493 "default": "''" 494 }, 495 "method": { 496 "name": "method", 497 "type": "text", 498 "primaryKey": false, 499 "notNull": false, 500 "autoincrement": false, 501 "default": "'GET'" 502 }, 503 "workspace_id": { 504 "name": "workspace_id", 505 "type": "integer", 506 "primaryKey": false, 507 "notNull": false, 508 "autoincrement": false 509 }, 510 "created_at": { 511 "name": "created_at", 512 "type": "integer", 513 "primaryKey": false, 514 "notNull": false, 515 "autoincrement": false, 516 "default": "(strftime('%s', 'now'))" 517 }, 518 "updated_at": { 519 "name": "updated_at", 520 "type": "integer", 521 "primaryKey": false, 522 "notNull": false, 523 "autoincrement": false, 524 "default": "(strftime('%s', 'now'))" 525 } 526 }, 527 "indexes": {}, 528 "foreignKeys": { 529 "monitor_workspace_id_workspace_id_fk": { 530 "name": "monitor_workspace_id_workspace_id_fk", 531 "tableFrom": "monitor", 532 "columnsFrom": ["workspace_id"], 533 "tableTo": "workspace", 534 "columnsTo": ["id"], 535 "onUpdate": "no action", 536 "onDelete": "no action" 537 } 538 }, 539 "compositePrimaryKeys": {}, 540 "uniqueConstraints": {} 541 }, 542 "monitors_to_pages": { 543 "name": "monitors_to_pages", 544 "columns": { 545 "monitor_id": { 546 "name": "monitor_id", 547 "type": "integer", 548 "primaryKey": false, 549 "notNull": true, 550 "autoincrement": false 551 }, 552 "page_id": { 553 "name": "page_id", 554 "type": "integer", 555 "primaryKey": false, 556 "notNull": true, 557 "autoincrement": false 558 } 559 }, 560 "indexes": {}, 561 "foreignKeys": { 562 "monitors_to_pages_monitor_id_monitor_id_fk": { 563 "name": "monitors_to_pages_monitor_id_monitor_id_fk", 564 "tableFrom": "monitors_to_pages", 565 "columnsFrom": ["monitor_id"], 566 "tableTo": "monitor", 567 "columnsTo": ["id"], 568 "onUpdate": "no action", 569 "onDelete": "cascade" 570 }, 571 "monitors_to_pages_page_id_page_id_fk": { 572 "name": "monitors_to_pages_page_id_page_id_fk", 573 "tableFrom": "monitors_to_pages", 574 "columnsFrom": ["page_id"], 575 "tableTo": "page", 576 "columnsTo": ["id"], 577 "onUpdate": "no action", 578 "onDelete": "cascade" 579 } 580 }, 581 "compositePrimaryKeys": { 582 "monitors_to_pages_monitor_id_page_id_pk": { 583 "columns": ["monitor_id", "page_id"] 584 } 585 }, 586 "uniqueConstraints": {} 587 }, 588 "user": { 589 "name": "user", 590 "columns": { 591 "id": { 592 "name": "id", 593 "type": "integer", 594 "primaryKey": true, 595 "notNull": true, 596 "autoincrement": false 597 }, 598 "tenant_id": { 599 "name": "tenant_id", 600 "type": "text(256)", 601 "primaryKey": false, 602 "notNull": false, 603 "autoincrement": false 604 }, 605 "first_name": { 606 "name": "first_name", 607 "type": "text", 608 "primaryKey": false, 609 "notNull": false, 610 "autoincrement": false, 611 "default": "''" 612 }, 613 "last_name": { 614 "name": "last_name", 615 "type": "text", 616 "primaryKey": false, 617 "notNull": false, 618 "autoincrement": false, 619 "default": "''" 620 }, 621 "email": { 622 "name": "email", 623 "type": "text", 624 "primaryKey": false, 625 "notNull": false, 626 "autoincrement": false, 627 "default": "''" 628 }, 629 "photo_url": { 630 "name": "photo_url", 631 "type": "text", 632 "primaryKey": false, 633 "notNull": false, 634 "autoincrement": false, 635 "default": "''" 636 }, 637 "created_at": { 638 "name": "created_at", 639 "type": "integer", 640 "primaryKey": false, 641 "notNull": false, 642 "autoincrement": false, 643 "default": "(strftime('%s', 'now'))" 644 }, 645 "updated_at": { 646 "name": "updated_at", 647 "type": "integer", 648 "primaryKey": false, 649 "notNull": false, 650 "autoincrement": false, 651 "default": "(strftime('%s', 'now'))" 652 } 653 }, 654 "indexes": { 655 "user_tenant_id_unique": { 656 "name": "user_tenant_id_unique", 657 "columns": ["tenant_id"], 658 "isUnique": true 659 } 660 }, 661 "foreignKeys": {}, 662 "compositePrimaryKeys": {}, 663 "uniqueConstraints": {} 664 }, 665 "users_to_workspaces": { 666 "name": "users_to_workspaces", 667 "columns": { 668 "user_id": { 669 "name": "user_id", 670 "type": "integer", 671 "primaryKey": false, 672 "notNull": true, 673 "autoincrement": false 674 }, 675 "workspace_id": { 676 "name": "workspace_id", 677 "type": "integer", 678 "primaryKey": false, 679 "notNull": true, 680 "autoincrement": false 681 } 682 }, 683 "indexes": {}, 684 "foreignKeys": { 685 "users_to_workspaces_user_id_user_id_fk": { 686 "name": "users_to_workspaces_user_id_user_id_fk", 687 "tableFrom": "users_to_workspaces", 688 "columnsFrom": ["user_id"], 689 "tableTo": "user", 690 "columnsTo": ["id"], 691 "onUpdate": "no action", 692 "onDelete": "no action" 693 }, 694 "users_to_workspaces_workspace_id_workspace_id_fk": { 695 "name": "users_to_workspaces_workspace_id_workspace_id_fk", 696 "tableFrom": "users_to_workspaces", 697 "columnsFrom": ["workspace_id"], 698 "tableTo": "workspace", 699 "columnsTo": ["id"], 700 "onUpdate": "no action", 701 "onDelete": "no action" 702 } 703 }, 704 "compositePrimaryKeys": { 705 "users_to_workspaces_user_id_workspace_id_pk": { 706 "columns": ["user_id", "workspace_id"] 707 } 708 }, 709 "uniqueConstraints": {} 710 }, 711 "workspace": { 712 "name": "workspace", 713 "columns": { 714 "id": { 715 "name": "id", 716 "type": "integer", 717 "primaryKey": true, 718 "notNull": true, 719 "autoincrement": false 720 }, 721 "slug": { 722 "name": "slug", 723 "type": "text", 724 "primaryKey": false, 725 "notNull": true, 726 "autoincrement": false 727 }, 728 "name": { 729 "name": "name", 730 "type": "text", 731 "primaryKey": false, 732 "notNull": false, 733 "autoincrement": false 734 }, 735 "stripe_id": { 736 "name": "stripe_id", 737 "type": "text(256)", 738 "primaryKey": false, 739 "notNull": false, 740 "autoincrement": false 741 }, 742 "subscription_id": { 743 "name": "subscription_id", 744 "type": "text", 745 "primaryKey": false, 746 "notNull": false, 747 "autoincrement": false 748 }, 749 "plan": { 750 "name": "plan", 751 "type": "text", 752 "primaryKey": false, 753 "notNull": false, 754 "autoincrement": false 755 }, 756 "ends_at": { 757 "name": "ends_at", 758 "type": "integer", 759 "primaryKey": false, 760 "notNull": false, 761 "autoincrement": false 762 }, 763 "paid_until": { 764 "name": "paid_until", 765 "type": "integer", 766 "primaryKey": false, 767 "notNull": false, 768 "autoincrement": false 769 }, 770 "created_at": { 771 "name": "created_at", 772 "type": "integer", 773 "primaryKey": false, 774 "notNull": false, 775 "autoincrement": false, 776 "default": "(strftime('%s', 'now'))" 777 }, 778 "updated_at": { 779 "name": "updated_at", 780 "type": "integer", 781 "primaryKey": false, 782 "notNull": false, 783 "autoincrement": false, 784 "default": "(strftime('%s', 'now'))" 785 } 786 }, 787 "indexes": { 788 "workspace_slug_unique": { 789 "name": "workspace_slug_unique", 790 "columns": ["slug"], 791 "isUnique": true 792 }, 793 "workspace_stripe_id_unique": { 794 "name": "workspace_stripe_id_unique", 795 "columns": ["stripe_id"], 796 "isUnique": true 797 } 798 }, 799 "foreignKeys": {}, 800 "compositePrimaryKeys": {}, 801 "uniqueConstraints": {} 802 }, 803 "notification": { 804 "name": "notification", 805 "columns": { 806 "id": { 807 "name": "id", 808 "type": "integer", 809 "primaryKey": true, 810 "notNull": true, 811 "autoincrement": false 812 }, 813 "name": { 814 "name": "name", 815 "type": "text", 816 "primaryKey": false, 817 "notNull": true, 818 "autoincrement": false 819 }, 820 "provider": { 821 "name": "provider", 822 "type": "text", 823 "primaryKey": false, 824 "notNull": true, 825 "autoincrement": false 826 }, 827 "data": { 828 "name": "data", 829 "type": "text", 830 "primaryKey": false, 831 "notNull": false, 832 "autoincrement": false, 833 "default": "'{}'" 834 }, 835 "workspace_id": { 836 "name": "workspace_id", 837 "type": "integer", 838 "primaryKey": false, 839 "notNull": false, 840 "autoincrement": false 841 }, 842 "created_at": { 843 "name": "created_at", 844 "type": "integer", 845 "primaryKey": false, 846 "notNull": false, 847 "autoincrement": false, 848 "default": "(strftime('%s', 'now'))" 849 }, 850 "updated_at": { 851 "name": "updated_at", 852 "type": "integer", 853 "primaryKey": false, 854 "notNull": false, 855 "autoincrement": false, 856 "default": "(strftime('%s', 'now'))" 857 } 858 }, 859 "indexes": {}, 860 "foreignKeys": { 861 "notification_workspace_id_workspace_id_fk": { 862 "name": "notification_workspace_id_workspace_id_fk", 863 "tableFrom": "notification", 864 "columnsFrom": ["workspace_id"], 865 "tableTo": "workspace", 866 "columnsTo": ["id"], 867 "onUpdate": "no action", 868 "onDelete": "no action" 869 } 870 }, 871 "compositePrimaryKeys": {}, 872 "uniqueConstraints": {} 873 }, 874 "notifications_to_monitors": { 875 "name": "notifications_to_monitors", 876 "columns": { 877 "monitor_id": { 878 "name": "monitor_id", 879 "type": "integer", 880 "primaryKey": false, 881 "notNull": true, 882 "autoincrement": false 883 }, 884 "notification_id": { 885 "name": "notification_id", 886 "type": "integer", 887 "primaryKey": false, 888 "notNull": true, 889 "autoincrement": false 890 } 891 }, 892 "indexes": {}, 893 "foreignKeys": { 894 "notifications_to_monitors_monitor_id_monitor_id_fk": { 895 "name": "notifications_to_monitors_monitor_id_monitor_id_fk", 896 "tableFrom": "notifications_to_monitors", 897 "columnsFrom": ["monitor_id"], 898 "tableTo": "monitor", 899 "columnsTo": ["id"], 900 "onUpdate": "no action", 901 "onDelete": "cascade" 902 }, 903 "notifications_to_monitors_notification_id_notification_id_fk": { 904 "name": "notifications_to_monitors_notification_id_notification_id_fk", 905 "tableFrom": "notifications_to_monitors", 906 "columnsFrom": ["notification_id"], 907 "tableTo": "notification", 908 "columnsTo": ["id"], 909 "onUpdate": "no action", 910 "onDelete": "cascade" 911 } 912 }, 913 "compositePrimaryKeys": { 914 "notifications_to_monitors_monitor_id_notification_id_pk": { 915 "columns": ["monitor_id", "notification_id"] 916 } 917 }, 918 "uniqueConstraints": {} 919 }, 920 "monitor_status": { 921 "name": "monitor_status", 922 "columns": { 923 "monitor_id": { 924 "name": "monitor_id", 925 "type": "integer", 926 "primaryKey": false, 927 "notNull": true, 928 "autoincrement": false 929 }, 930 "region": { 931 "name": "region", 932 "type": "text", 933 "primaryKey": false, 934 "notNull": true, 935 "autoincrement": false, 936 "default": "''" 937 }, 938 "status": { 939 "name": "status", 940 "type": "text", 941 "primaryKey": false, 942 "notNull": true, 943 "autoincrement": false, 944 "default": "'active'" 945 }, 946 "created_at": { 947 "name": "created_at", 948 "type": "integer", 949 "primaryKey": false, 950 "notNull": false, 951 "autoincrement": false, 952 "default": "(strftime('%s', 'now'))" 953 }, 954 "updated_at": { 955 "name": "updated_at", 956 "type": "integer", 957 "primaryKey": false, 958 "notNull": false, 959 "autoincrement": false, 960 "default": "(strftime('%s', 'now'))" 961 } 962 }, 963 "indexes": { 964 "monitor_status_idx": { 965 "name": "monitor_status_idx", 966 "columns": ["monitor_id", "region"], 967 "isUnique": false 968 } 969 }, 970 "foreignKeys": { 971 "monitor_status_monitor_id_monitor_id_fk": { 972 "name": "monitor_status_monitor_id_monitor_id_fk", 973 "tableFrom": "monitor_status", 974 "columnsFrom": ["monitor_id"], 975 "tableTo": "monitor", 976 "columnsTo": ["id"], 977 "onUpdate": "no action", 978 "onDelete": "cascade" 979 } 980 }, 981 "compositePrimaryKeys": { 982 "monitor_status_monitor_id_region_pk": { 983 "columns": ["monitor_id", "region"] 984 } 985 }, 986 "uniqueConstraints": {} 987 } 988 }, 989 "enums": {}, 990 "_meta": { 991 "tables": {}, 992 "columns": {} 993 }, 994 "id": "452e7037-85cf-4d9a-b4e2-375a695d5fa8", 995 "prevId": "0f3dddb6-09cf-46a4-b12c-c5bb82475b94" 996}