WIP! A BB-style forum, on the ATmosphere! We're still working... we'll be back soon when we have something to show off!
node typescript hono htmx atproto
at root/atb-56-theme-caching-layer 1172 lines 30 kB view raw
1{ 2 "version": "6", 3 "dialect": "sqlite", 4 "id": "84f6d742-677b-4159-86e3-9c5abadccec5", 5 "prevId": "00000000-0000-0000-0000-000000000000", 6 "tables": { 7 "backfill_errors": { 8 "name": "backfill_errors", 9 "columns": { 10 "id": { 11 "name": "id", 12 "type": "integer", 13 "primaryKey": true, 14 "notNull": true, 15 "autoincrement": true 16 }, 17 "backfill_id": { 18 "name": "backfill_id", 19 "type": "integer", 20 "primaryKey": false, 21 "notNull": true, 22 "autoincrement": false 23 }, 24 "did": { 25 "name": "did", 26 "type": "text", 27 "primaryKey": false, 28 "notNull": true, 29 "autoincrement": false 30 }, 31 "collection": { 32 "name": "collection", 33 "type": "text", 34 "primaryKey": false, 35 "notNull": true, 36 "autoincrement": false 37 }, 38 "error_message": { 39 "name": "error_message", 40 "type": "text", 41 "primaryKey": false, 42 "notNull": true, 43 "autoincrement": false 44 }, 45 "created_at": { 46 "name": "created_at", 47 "type": "integer", 48 "primaryKey": false, 49 "notNull": true, 50 "autoincrement": false 51 } 52 }, 53 "indexes": { 54 "backfill_errors_backfill_id_idx": { 55 "name": "backfill_errors_backfill_id_idx", 56 "columns": [ 57 "backfill_id" 58 ], 59 "isUnique": false 60 } 61 }, 62 "foreignKeys": { 63 "backfill_errors_backfill_id_backfill_progress_id_fk": { 64 "name": "backfill_errors_backfill_id_backfill_progress_id_fk", 65 "tableFrom": "backfill_errors", 66 "tableTo": "backfill_progress", 67 "columnsFrom": [ 68 "backfill_id" 69 ], 70 "columnsTo": [ 71 "id" 72 ], 73 "onDelete": "no action", 74 "onUpdate": "no action" 75 } 76 }, 77 "compositePrimaryKeys": {}, 78 "uniqueConstraints": {}, 79 "checkConstraints": {} 80 }, 81 "backfill_progress": { 82 "name": "backfill_progress", 83 "columns": { 84 "id": { 85 "name": "id", 86 "type": "integer", 87 "primaryKey": true, 88 "notNull": true, 89 "autoincrement": true 90 }, 91 "status": { 92 "name": "status", 93 "type": "text", 94 "primaryKey": false, 95 "notNull": true, 96 "autoincrement": false 97 }, 98 "backfill_type": { 99 "name": "backfill_type", 100 "type": "text", 101 "primaryKey": false, 102 "notNull": true, 103 "autoincrement": false 104 }, 105 "last_processed_did": { 106 "name": "last_processed_did", 107 "type": "text", 108 "primaryKey": false, 109 "notNull": false, 110 "autoincrement": false 111 }, 112 "dids_total": { 113 "name": "dids_total", 114 "type": "integer", 115 "primaryKey": false, 116 "notNull": true, 117 "autoincrement": false, 118 "default": 0 119 }, 120 "dids_processed": { 121 "name": "dids_processed", 122 "type": "integer", 123 "primaryKey": false, 124 "notNull": true, 125 "autoincrement": false, 126 "default": 0 127 }, 128 "records_indexed": { 129 "name": "records_indexed", 130 "type": "integer", 131 "primaryKey": false, 132 "notNull": true, 133 "autoincrement": false, 134 "default": 0 135 }, 136 "started_at": { 137 "name": "started_at", 138 "type": "integer", 139 "primaryKey": false, 140 "notNull": true, 141 "autoincrement": false 142 }, 143 "completed_at": { 144 "name": "completed_at", 145 "type": "integer", 146 "primaryKey": false, 147 "notNull": false, 148 "autoincrement": false 149 }, 150 "error_message": { 151 "name": "error_message", 152 "type": "text", 153 "primaryKey": false, 154 "notNull": false, 155 "autoincrement": false 156 } 157 }, 158 "indexes": {}, 159 "foreignKeys": {}, 160 "compositePrimaryKeys": {}, 161 "uniqueConstraints": {}, 162 "checkConstraints": {} 163 }, 164 "boards": { 165 "name": "boards", 166 "columns": { 167 "id": { 168 "name": "id", 169 "type": "integer", 170 "primaryKey": true, 171 "notNull": true, 172 "autoincrement": true 173 }, 174 "did": { 175 "name": "did", 176 "type": "text", 177 "primaryKey": false, 178 "notNull": true, 179 "autoincrement": false 180 }, 181 "rkey": { 182 "name": "rkey", 183 "type": "text", 184 "primaryKey": false, 185 "notNull": true, 186 "autoincrement": false 187 }, 188 "cid": { 189 "name": "cid", 190 "type": "text", 191 "primaryKey": false, 192 "notNull": true, 193 "autoincrement": false 194 }, 195 "name": { 196 "name": "name", 197 "type": "text", 198 "primaryKey": false, 199 "notNull": true, 200 "autoincrement": false 201 }, 202 "description": { 203 "name": "description", 204 "type": "text", 205 "primaryKey": false, 206 "notNull": false, 207 "autoincrement": false 208 }, 209 "slug": { 210 "name": "slug", 211 "type": "text", 212 "primaryKey": false, 213 "notNull": false, 214 "autoincrement": false 215 }, 216 "sort_order": { 217 "name": "sort_order", 218 "type": "integer", 219 "primaryKey": false, 220 "notNull": false, 221 "autoincrement": false 222 }, 223 "category_id": { 224 "name": "category_id", 225 "type": "integer", 226 "primaryKey": false, 227 "notNull": false, 228 "autoincrement": false 229 }, 230 "category_uri": { 231 "name": "category_uri", 232 "type": "text", 233 "primaryKey": false, 234 "notNull": true, 235 "autoincrement": false 236 }, 237 "created_at": { 238 "name": "created_at", 239 "type": "integer", 240 "primaryKey": false, 241 "notNull": true, 242 "autoincrement": false 243 }, 244 "indexed_at": { 245 "name": "indexed_at", 246 "type": "integer", 247 "primaryKey": false, 248 "notNull": true, 249 "autoincrement": false 250 } 251 }, 252 "indexes": { 253 "boards_did_rkey_idx": { 254 "name": "boards_did_rkey_idx", 255 "columns": [ 256 "did", 257 "rkey" 258 ], 259 "isUnique": true 260 }, 261 "boards_category_id_idx": { 262 "name": "boards_category_id_idx", 263 "columns": [ 264 "category_id" 265 ], 266 "isUnique": false 267 } 268 }, 269 "foreignKeys": { 270 "boards_category_id_categories_id_fk": { 271 "name": "boards_category_id_categories_id_fk", 272 "tableFrom": "boards", 273 "tableTo": "categories", 274 "columnsFrom": [ 275 "category_id" 276 ], 277 "columnsTo": [ 278 "id" 279 ], 280 "onDelete": "no action", 281 "onUpdate": "no action" 282 } 283 }, 284 "compositePrimaryKeys": {}, 285 "uniqueConstraints": {}, 286 "checkConstraints": {} 287 }, 288 "categories": { 289 "name": "categories", 290 "columns": { 291 "id": { 292 "name": "id", 293 "type": "integer", 294 "primaryKey": true, 295 "notNull": true, 296 "autoincrement": true 297 }, 298 "did": { 299 "name": "did", 300 "type": "text", 301 "primaryKey": false, 302 "notNull": true, 303 "autoincrement": false 304 }, 305 "rkey": { 306 "name": "rkey", 307 "type": "text", 308 "primaryKey": false, 309 "notNull": true, 310 "autoincrement": false 311 }, 312 "cid": { 313 "name": "cid", 314 "type": "text", 315 "primaryKey": false, 316 "notNull": true, 317 "autoincrement": false 318 }, 319 "name": { 320 "name": "name", 321 "type": "text", 322 "primaryKey": false, 323 "notNull": true, 324 "autoincrement": false 325 }, 326 "description": { 327 "name": "description", 328 "type": "text", 329 "primaryKey": false, 330 "notNull": false, 331 "autoincrement": false 332 }, 333 "slug": { 334 "name": "slug", 335 "type": "text", 336 "primaryKey": false, 337 "notNull": false, 338 "autoincrement": false 339 }, 340 "sort_order": { 341 "name": "sort_order", 342 "type": "integer", 343 "primaryKey": false, 344 "notNull": false, 345 "autoincrement": false 346 }, 347 "forum_id": { 348 "name": "forum_id", 349 "type": "integer", 350 "primaryKey": false, 351 "notNull": false, 352 "autoincrement": false 353 }, 354 "created_at": { 355 "name": "created_at", 356 "type": "integer", 357 "primaryKey": false, 358 "notNull": true, 359 "autoincrement": false 360 }, 361 "indexed_at": { 362 "name": "indexed_at", 363 "type": "integer", 364 "primaryKey": false, 365 "notNull": true, 366 "autoincrement": false 367 } 368 }, 369 "indexes": { 370 "categories_did_rkey_idx": { 371 "name": "categories_did_rkey_idx", 372 "columns": [ 373 "did", 374 "rkey" 375 ], 376 "isUnique": true 377 } 378 }, 379 "foreignKeys": { 380 "categories_forum_id_forums_id_fk": { 381 "name": "categories_forum_id_forums_id_fk", 382 "tableFrom": "categories", 383 "tableTo": "forums", 384 "columnsFrom": [ 385 "forum_id" 386 ], 387 "columnsTo": [ 388 "id" 389 ], 390 "onDelete": "no action", 391 "onUpdate": "no action" 392 } 393 }, 394 "compositePrimaryKeys": {}, 395 "uniqueConstraints": {}, 396 "checkConstraints": {} 397 }, 398 "firehose_cursor": { 399 "name": "firehose_cursor", 400 "columns": { 401 "service": { 402 "name": "service", 403 "type": "text", 404 "primaryKey": true, 405 "notNull": true, 406 "autoincrement": false, 407 "default": "'jetstream'" 408 }, 409 "cursor": { 410 "name": "cursor", 411 "type": "integer", 412 "primaryKey": false, 413 "notNull": true, 414 "autoincrement": false 415 }, 416 "updated_at": { 417 "name": "updated_at", 418 "type": "integer", 419 "primaryKey": false, 420 "notNull": true, 421 "autoincrement": false 422 } 423 }, 424 "indexes": {}, 425 "foreignKeys": {}, 426 "compositePrimaryKeys": {}, 427 "uniqueConstraints": {}, 428 "checkConstraints": {} 429 }, 430 "forums": { 431 "name": "forums", 432 "columns": { 433 "id": { 434 "name": "id", 435 "type": "integer", 436 "primaryKey": true, 437 "notNull": true, 438 "autoincrement": true 439 }, 440 "did": { 441 "name": "did", 442 "type": "text", 443 "primaryKey": false, 444 "notNull": true, 445 "autoincrement": false 446 }, 447 "rkey": { 448 "name": "rkey", 449 "type": "text", 450 "primaryKey": false, 451 "notNull": true, 452 "autoincrement": false 453 }, 454 "cid": { 455 "name": "cid", 456 "type": "text", 457 "primaryKey": false, 458 "notNull": true, 459 "autoincrement": false 460 }, 461 "name": { 462 "name": "name", 463 "type": "text", 464 "primaryKey": false, 465 "notNull": true, 466 "autoincrement": false 467 }, 468 "description": { 469 "name": "description", 470 "type": "text", 471 "primaryKey": false, 472 "notNull": false, 473 "autoincrement": false 474 }, 475 "indexed_at": { 476 "name": "indexed_at", 477 "type": "integer", 478 "primaryKey": false, 479 "notNull": true, 480 "autoincrement": false 481 } 482 }, 483 "indexes": { 484 "forums_did_rkey_idx": { 485 "name": "forums_did_rkey_idx", 486 "columns": [ 487 "did", 488 "rkey" 489 ], 490 "isUnique": true 491 } 492 }, 493 "foreignKeys": {}, 494 "compositePrimaryKeys": {}, 495 "uniqueConstraints": {}, 496 "checkConstraints": {} 497 }, 498 "memberships": { 499 "name": "memberships", 500 "columns": { 501 "id": { 502 "name": "id", 503 "type": "integer", 504 "primaryKey": true, 505 "notNull": true, 506 "autoincrement": true 507 }, 508 "did": { 509 "name": "did", 510 "type": "text", 511 "primaryKey": false, 512 "notNull": true, 513 "autoincrement": false 514 }, 515 "rkey": { 516 "name": "rkey", 517 "type": "text", 518 "primaryKey": false, 519 "notNull": true, 520 "autoincrement": false 521 }, 522 "cid": { 523 "name": "cid", 524 "type": "text", 525 "primaryKey": false, 526 "notNull": true, 527 "autoincrement": false 528 }, 529 "forum_id": { 530 "name": "forum_id", 531 "type": "integer", 532 "primaryKey": false, 533 "notNull": false, 534 "autoincrement": false 535 }, 536 "forum_uri": { 537 "name": "forum_uri", 538 "type": "text", 539 "primaryKey": false, 540 "notNull": true, 541 "autoincrement": false 542 }, 543 "role": { 544 "name": "role", 545 "type": "text", 546 "primaryKey": false, 547 "notNull": false, 548 "autoincrement": false 549 }, 550 "role_uri": { 551 "name": "role_uri", 552 "type": "text", 553 "primaryKey": false, 554 "notNull": false, 555 "autoincrement": false 556 }, 557 "joined_at": { 558 "name": "joined_at", 559 "type": "integer", 560 "primaryKey": false, 561 "notNull": false, 562 "autoincrement": false 563 }, 564 "created_at": { 565 "name": "created_at", 566 "type": "integer", 567 "primaryKey": false, 568 "notNull": true, 569 "autoincrement": false 570 }, 571 "indexed_at": { 572 "name": "indexed_at", 573 "type": "integer", 574 "primaryKey": false, 575 "notNull": true, 576 "autoincrement": false 577 } 578 }, 579 "indexes": { 580 "memberships_did_rkey_idx": { 581 "name": "memberships_did_rkey_idx", 582 "columns": [ 583 "did", 584 "rkey" 585 ], 586 "isUnique": true 587 }, 588 "memberships_did_idx": { 589 "name": "memberships_did_idx", 590 "columns": [ 591 "did" 592 ], 593 "isUnique": false 594 } 595 }, 596 "foreignKeys": { 597 "memberships_did_users_did_fk": { 598 "name": "memberships_did_users_did_fk", 599 "tableFrom": "memberships", 600 "tableTo": "users", 601 "columnsFrom": [ 602 "did" 603 ], 604 "columnsTo": [ 605 "did" 606 ], 607 "onDelete": "no action", 608 "onUpdate": "no action" 609 }, 610 "memberships_forum_id_forums_id_fk": { 611 "name": "memberships_forum_id_forums_id_fk", 612 "tableFrom": "memberships", 613 "tableTo": "forums", 614 "columnsFrom": [ 615 "forum_id" 616 ], 617 "columnsTo": [ 618 "id" 619 ], 620 "onDelete": "no action", 621 "onUpdate": "no action" 622 } 623 }, 624 "compositePrimaryKeys": {}, 625 "uniqueConstraints": {}, 626 "checkConstraints": {} 627 }, 628 "mod_actions": { 629 "name": "mod_actions", 630 "columns": { 631 "id": { 632 "name": "id", 633 "type": "integer", 634 "primaryKey": true, 635 "notNull": true, 636 "autoincrement": true 637 }, 638 "did": { 639 "name": "did", 640 "type": "text", 641 "primaryKey": false, 642 "notNull": true, 643 "autoincrement": false 644 }, 645 "rkey": { 646 "name": "rkey", 647 "type": "text", 648 "primaryKey": false, 649 "notNull": true, 650 "autoincrement": false 651 }, 652 "cid": { 653 "name": "cid", 654 "type": "text", 655 "primaryKey": false, 656 "notNull": true, 657 "autoincrement": false 658 }, 659 "action": { 660 "name": "action", 661 "type": "text", 662 "primaryKey": false, 663 "notNull": true, 664 "autoincrement": false 665 }, 666 "subject_did": { 667 "name": "subject_did", 668 "type": "text", 669 "primaryKey": false, 670 "notNull": false, 671 "autoincrement": false 672 }, 673 "subject_post_uri": { 674 "name": "subject_post_uri", 675 "type": "text", 676 "primaryKey": false, 677 "notNull": false, 678 "autoincrement": false 679 }, 680 "forum_id": { 681 "name": "forum_id", 682 "type": "integer", 683 "primaryKey": false, 684 "notNull": false, 685 "autoincrement": false 686 }, 687 "reason": { 688 "name": "reason", 689 "type": "text", 690 "primaryKey": false, 691 "notNull": false, 692 "autoincrement": false 693 }, 694 "created_by": { 695 "name": "created_by", 696 "type": "text", 697 "primaryKey": false, 698 "notNull": true, 699 "autoincrement": false 700 }, 701 "expires_at": { 702 "name": "expires_at", 703 "type": "integer", 704 "primaryKey": false, 705 "notNull": false, 706 "autoincrement": false 707 }, 708 "created_at": { 709 "name": "created_at", 710 "type": "integer", 711 "primaryKey": false, 712 "notNull": true, 713 "autoincrement": false 714 }, 715 "indexed_at": { 716 "name": "indexed_at", 717 "type": "integer", 718 "primaryKey": false, 719 "notNull": true, 720 "autoincrement": false 721 } 722 }, 723 "indexes": { 724 "mod_actions_did_rkey_idx": { 725 "name": "mod_actions_did_rkey_idx", 726 "columns": [ 727 "did", 728 "rkey" 729 ], 730 "isUnique": true 731 }, 732 "mod_actions_subject_did_idx": { 733 "name": "mod_actions_subject_did_idx", 734 "columns": [ 735 "subject_did" 736 ], 737 "isUnique": false 738 }, 739 "mod_actions_subject_post_uri_idx": { 740 "name": "mod_actions_subject_post_uri_idx", 741 "columns": [ 742 "subject_post_uri" 743 ], 744 "isUnique": false 745 } 746 }, 747 "foreignKeys": { 748 "mod_actions_forum_id_forums_id_fk": { 749 "name": "mod_actions_forum_id_forums_id_fk", 750 "tableFrom": "mod_actions", 751 "tableTo": "forums", 752 "columnsFrom": [ 753 "forum_id" 754 ], 755 "columnsTo": [ 756 "id" 757 ], 758 "onDelete": "no action", 759 "onUpdate": "no action" 760 } 761 }, 762 "compositePrimaryKeys": {}, 763 "uniqueConstraints": {}, 764 "checkConstraints": {} 765 }, 766 "posts": { 767 "name": "posts", 768 "columns": { 769 "id": { 770 "name": "id", 771 "type": "integer", 772 "primaryKey": true, 773 "notNull": true, 774 "autoincrement": true 775 }, 776 "did": { 777 "name": "did", 778 "type": "text", 779 "primaryKey": false, 780 "notNull": true, 781 "autoincrement": false 782 }, 783 "rkey": { 784 "name": "rkey", 785 "type": "text", 786 "primaryKey": false, 787 "notNull": true, 788 "autoincrement": false 789 }, 790 "cid": { 791 "name": "cid", 792 "type": "text", 793 "primaryKey": false, 794 "notNull": true, 795 "autoincrement": false 796 }, 797 "title": { 798 "name": "title", 799 "type": "text", 800 "primaryKey": false, 801 "notNull": false, 802 "autoincrement": false 803 }, 804 "text": { 805 "name": "text", 806 "type": "text", 807 "primaryKey": false, 808 "notNull": true, 809 "autoincrement": false 810 }, 811 "forum_uri": { 812 "name": "forum_uri", 813 "type": "text", 814 "primaryKey": false, 815 "notNull": false, 816 "autoincrement": false 817 }, 818 "board_uri": { 819 "name": "board_uri", 820 "type": "text", 821 "primaryKey": false, 822 "notNull": false, 823 "autoincrement": false 824 }, 825 "board_id": { 826 "name": "board_id", 827 "type": "integer", 828 "primaryKey": false, 829 "notNull": false, 830 "autoincrement": false 831 }, 832 "root_post_id": { 833 "name": "root_post_id", 834 "type": "integer", 835 "primaryKey": false, 836 "notNull": false, 837 "autoincrement": false 838 }, 839 "parent_post_id": { 840 "name": "parent_post_id", 841 "type": "integer", 842 "primaryKey": false, 843 "notNull": false, 844 "autoincrement": false 845 }, 846 "root_uri": { 847 "name": "root_uri", 848 "type": "text", 849 "primaryKey": false, 850 "notNull": false, 851 "autoincrement": false 852 }, 853 "parent_uri": { 854 "name": "parent_uri", 855 "type": "text", 856 "primaryKey": false, 857 "notNull": false, 858 "autoincrement": false 859 }, 860 "created_at": { 861 "name": "created_at", 862 "type": "integer", 863 "primaryKey": false, 864 "notNull": true, 865 "autoincrement": false 866 }, 867 "indexed_at": { 868 "name": "indexed_at", 869 "type": "integer", 870 "primaryKey": false, 871 "notNull": true, 872 "autoincrement": false 873 }, 874 "banned_by_mod": { 875 "name": "banned_by_mod", 876 "type": "integer", 877 "primaryKey": false, 878 "notNull": true, 879 "autoincrement": false, 880 "default": false 881 }, 882 "deleted_by_user": { 883 "name": "deleted_by_user", 884 "type": "integer", 885 "primaryKey": false, 886 "notNull": true, 887 "autoincrement": false, 888 "default": false 889 } 890 }, 891 "indexes": { 892 "posts_did_rkey_idx": { 893 "name": "posts_did_rkey_idx", 894 "columns": [ 895 "did", 896 "rkey" 897 ], 898 "isUnique": true 899 }, 900 "posts_forum_uri_idx": { 901 "name": "posts_forum_uri_idx", 902 "columns": [ 903 "forum_uri" 904 ], 905 "isUnique": false 906 }, 907 "posts_board_id_idx": { 908 "name": "posts_board_id_idx", 909 "columns": [ 910 "board_id" 911 ], 912 "isUnique": false 913 }, 914 "posts_board_uri_idx": { 915 "name": "posts_board_uri_idx", 916 "columns": [ 917 "board_uri" 918 ], 919 "isUnique": false 920 }, 921 "posts_root_post_id_idx": { 922 "name": "posts_root_post_id_idx", 923 "columns": [ 924 "root_post_id" 925 ], 926 "isUnique": false 927 } 928 }, 929 "foreignKeys": { 930 "posts_did_users_did_fk": { 931 "name": "posts_did_users_did_fk", 932 "tableFrom": "posts", 933 "tableTo": "users", 934 "columnsFrom": [ 935 "did" 936 ], 937 "columnsTo": [ 938 "did" 939 ], 940 "onDelete": "no action", 941 "onUpdate": "no action" 942 }, 943 "posts_board_id_boards_id_fk": { 944 "name": "posts_board_id_boards_id_fk", 945 "tableFrom": "posts", 946 "tableTo": "boards", 947 "columnsFrom": [ 948 "board_id" 949 ], 950 "columnsTo": [ 951 "id" 952 ], 953 "onDelete": "no action", 954 "onUpdate": "no action" 955 }, 956 "posts_root_post_id_posts_id_fk": { 957 "name": "posts_root_post_id_posts_id_fk", 958 "tableFrom": "posts", 959 "tableTo": "posts", 960 "columnsFrom": [ 961 "root_post_id" 962 ], 963 "columnsTo": [ 964 "id" 965 ], 966 "onDelete": "no action", 967 "onUpdate": "no action" 968 }, 969 "posts_parent_post_id_posts_id_fk": { 970 "name": "posts_parent_post_id_posts_id_fk", 971 "tableFrom": "posts", 972 "tableTo": "posts", 973 "columnsFrom": [ 974 "parent_post_id" 975 ], 976 "columnsTo": [ 977 "id" 978 ], 979 "onDelete": "no action", 980 "onUpdate": "no action" 981 } 982 }, 983 "compositePrimaryKeys": {}, 984 "uniqueConstraints": {}, 985 "checkConstraints": {} 986 }, 987 "role_permissions": { 988 "name": "role_permissions", 989 "columns": { 990 "role_id": { 991 "name": "role_id", 992 "type": "integer", 993 "primaryKey": false, 994 "notNull": true, 995 "autoincrement": false 996 }, 997 "permission": { 998 "name": "permission", 999 "type": "text", 1000 "primaryKey": false, 1001 "notNull": true, 1002 "autoincrement": false 1003 } 1004 }, 1005 "indexes": {}, 1006 "foreignKeys": { 1007 "role_permissions_role_id_roles_id_fk": { 1008 "name": "role_permissions_role_id_roles_id_fk", 1009 "tableFrom": "role_permissions", 1010 "tableTo": "roles", 1011 "columnsFrom": [ 1012 "role_id" 1013 ], 1014 "columnsTo": [ 1015 "id" 1016 ], 1017 "onDelete": "cascade", 1018 "onUpdate": "no action" 1019 } 1020 }, 1021 "compositePrimaryKeys": { 1022 "role_permissions_role_id_permission_pk": { 1023 "columns": [ 1024 "role_id", 1025 "permission" 1026 ], 1027 "name": "role_permissions_role_id_permission_pk" 1028 } 1029 }, 1030 "uniqueConstraints": {}, 1031 "checkConstraints": {} 1032 }, 1033 "roles": { 1034 "name": "roles", 1035 "columns": { 1036 "id": { 1037 "name": "id", 1038 "type": "integer", 1039 "primaryKey": true, 1040 "notNull": true, 1041 "autoincrement": true 1042 }, 1043 "did": { 1044 "name": "did", 1045 "type": "text", 1046 "primaryKey": false, 1047 "notNull": true, 1048 "autoincrement": false 1049 }, 1050 "rkey": { 1051 "name": "rkey", 1052 "type": "text", 1053 "primaryKey": false, 1054 "notNull": true, 1055 "autoincrement": false 1056 }, 1057 "cid": { 1058 "name": "cid", 1059 "type": "text", 1060 "primaryKey": false, 1061 "notNull": true, 1062 "autoincrement": false 1063 }, 1064 "name": { 1065 "name": "name", 1066 "type": "text", 1067 "primaryKey": false, 1068 "notNull": true, 1069 "autoincrement": false 1070 }, 1071 "description": { 1072 "name": "description", 1073 "type": "text", 1074 "primaryKey": false, 1075 "notNull": false, 1076 "autoincrement": false 1077 }, 1078 "priority": { 1079 "name": "priority", 1080 "type": "integer", 1081 "primaryKey": false, 1082 "notNull": true, 1083 "autoincrement": false 1084 }, 1085 "created_at": { 1086 "name": "created_at", 1087 "type": "integer", 1088 "primaryKey": false, 1089 "notNull": true, 1090 "autoincrement": false 1091 }, 1092 "indexed_at": { 1093 "name": "indexed_at", 1094 "type": "integer", 1095 "primaryKey": false, 1096 "notNull": true, 1097 "autoincrement": false 1098 } 1099 }, 1100 "indexes": { 1101 "roles_did_rkey_idx": { 1102 "name": "roles_did_rkey_idx", 1103 "columns": [ 1104 "did", 1105 "rkey" 1106 ], 1107 "isUnique": true 1108 }, 1109 "roles_did_idx": { 1110 "name": "roles_did_idx", 1111 "columns": [ 1112 "did" 1113 ], 1114 "isUnique": false 1115 }, 1116 "roles_did_name_idx": { 1117 "name": "roles_did_name_idx", 1118 "columns": [ 1119 "did", 1120 "name" 1121 ], 1122 "isUnique": false 1123 } 1124 }, 1125 "foreignKeys": {}, 1126 "compositePrimaryKeys": {}, 1127 "uniqueConstraints": {}, 1128 "checkConstraints": {} 1129 }, 1130 "users": { 1131 "name": "users", 1132 "columns": { 1133 "did": { 1134 "name": "did", 1135 "type": "text", 1136 "primaryKey": true, 1137 "notNull": true, 1138 "autoincrement": false 1139 }, 1140 "handle": { 1141 "name": "handle", 1142 "type": "text", 1143 "primaryKey": false, 1144 "notNull": false, 1145 "autoincrement": false 1146 }, 1147 "indexed_at": { 1148 "name": "indexed_at", 1149 "type": "integer", 1150 "primaryKey": false, 1151 "notNull": true, 1152 "autoincrement": false 1153 } 1154 }, 1155 "indexes": {}, 1156 "foreignKeys": {}, 1157 "compositePrimaryKeys": {}, 1158 "uniqueConstraints": {}, 1159 "checkConstraints": {} 1160 } 1161 }, 1162 "views": {}, 1163 "enums": {}, 1164 "_meta": { 1165 "schemas": {}, 1166 "tables": {}, 1167 "columns": {} 1168 }, 1169 "internal": { 1170 "indexes": {} 1171 } 1172}