|
1 | 1 | {
|
2 |
| - "id": "aa1d865a-e96e-43c1-92d7-6536096e654f", |
| 2 | + "id": "f2dbd406-adc5-4a0d-86e8-1ea6f04961d0", |
3 | 3 | "prevId": "77d439c3-9c69-455f-9c0d-66f09afd16ed",
|
4 | 4 | "version": "7",
|
5 | 5 | "dialect": "postgresql",
|
|
65 | 65 | ]
|
66 | 66 | }
|
67 | 67 | },
|
68 |
| - "policies": {}, |
69 |
| - "checkConstraints": {}, |
70 |
| - "isRLSEnabled": false |
| 68 | + "checkConstraints": {} |
71 | 69 | },
|
72 | 70 | "public.there_users": {
|
73 | 71 | "name": "there_users",
|
|
117 | 115 | ]
|
118 | 116 | }
|
119 | 117 | },
|
120 |
| - "policies": {}, |
121 |
| - "checkConstraints": {}, |
122 |
| - "isRLSEnabled": false |
| 118 | + "checkConstraints": {} |
123 | 119 | },
|
124 | 120 | "public.users": {
|
125 | 121 | "name": "users",
|
|
236 | 232 | ]
|
237 | 233 | }
|
238 | 234 | },
|
239 |
| - "policies": {}, |
240 |
| - "checkConstraints": {}, |
241 |
| - "isRLSEnabled": false |
| 235 | + "checkConstraints": {} |
242 | 236 | },
|
243 | 237 | "public.sessions": {
|
244 | 238 | "name": "sessions",
|
|
367 | 361 | },
|
368 | 362 | "compositePrimaryKeys": {},
|
369 | 363 | "uniqueConstraints": {},
|
370 |
| - "policies": {}, |
371 |
| - "checkConstraints": {}, |
372 |
| - "isRLSEnabled": false |
| 364 | + "checkConstraints": {} |
373 | 365 | },
|
374 | 366 | "public.login_codes": {
|
375 | 367 | "name": "login_codes",
|
|
439 | 431 | ]
|
440 | 432 | }
|
441 | 433 | },
|
442 |
| - "policies": {}, |
443 |
| - "checkConstraints": {}, |
444 |
| - "isRLSEnabled": false |
| 434 | + "checkConstraints": {} |
445 | 435 | },
|
446 | 436 | "public.spaces": {
|
447 | 437 | "name": "spaces",
|
|
511 | 501 | ]
|
512 | 502 | }
|
513 | 503 | },
|
514 |
| - "policies": {}, |
515 |
| - "checkConstraints": {}, |
516 |
| - "isRLSEnabled": false |
| 504 | + "checkConstraints": {} |
517 | 505 | },
|
518 | 506 | "public.members": {
|
519 | 507 | "name": "members",
|
|
593 | 581 | ]
|
594 | 582 | }
|
595 | 583 | },
|
596 |
| - "policies": {}, |
597 |
| - "checkConstraints": {}, |
598 |
| - "isRLSEnabled": false |
| 584 | + "checkConstraints": {} |
599 | 585 | },
|
600 | 586 | "public.chats": {
|
601 | 587 | "name": "chats",
|
|
763 | 749 | ]
|
764 | 750 | }
|
765 | 751 | },
|
766 |
| - "policies": {}, |
767 | 752 | "checkConstraints": {
|
768 | 753 | "user_ids_check": {
|
769 | 754 | "name": "user_ids_check",
|
770 | 755 | "value": "\"chats\".\"min_user_id\" <= \"chats\".\"max_user_id\""
|
771 | 756 | }
|
772 |
| - }, |
773 |
| - "isRLSEnabled": false |
| 757 | + } |
774 | 758 | },
|
775 | 759 | "public.messages": {
|
776 | 760 | "name": "messages",
|
|
843 | 827 | "notNull": true,
|
844 | 828 | "default": "now()"
|
845 | 829 | },
|
846 |
| - "replied_to_message_id": { |
847 |
| - "name": "replied_to_message_id", |
| 830 | + "reply_to_msg_id": { |
| 831 | + "name": "reply_to_msg_id", |
848 | 832 | "type": "integer",
|
849 | 833 | "primaryKey": false,
|
850 | 834 | "notNull": false
|
|
920 | 904 | ]
|
921 | 905 | }
|
922 | 906 | },
|
923 |
| - "policies": {}, |
924 |
| - "checkConstraints": {}, |
925 |
| - "isRLSEnabled": false |
| 907 | + "checkConstraints": {} |
926 | 908 | },
|
927 | 909 | "public.dialogs": {
|
928 | 910 | "name": "dialogs",
|
|
1050 | 1032 | ]
|
1051 | 1033 | }
|
1052 | 1034 | },
|
1053 |
| - "policies": {}, |
1054 |
| - "checkConstraints": {}, |
1055 |
| - "isRLSEnabled": false |
| 1035 | + "checkConstraints": {} |
| 1036 | + }, |
| 1037 | + "public.reactions": { |
| 1038 | + "name": "reactions", |
| 1039 | + "schema": "", |
| 1040 | + "columns": { |
| 1041 | + "id": { |
| 1042 | + "name": "id", |
| 1043 | + "type": "serial", |
| 1044 | + "primaryKey": true, |
| 1045 | + "notNull": true |
| 1046 | + }, |
| 1047 | + "message_id": { |
| 1048 | + "name": "message_id", |
| 1049 | + "type": "integer", |
| 1050 | + "primaryKey": false, |
| 1051 | + "notNull": true |
| 1052 | + }, |
| 1053 | + "chat_id": { |
| 1054 | + "name": "chat_id", |
| 1055 | + "type": "integer", |
| 1056 | + "primaryKey": false, |
| 1057 | + "notNull": true |
| 1058 | + }, |
| 1059 | + "user_id": { |
| 1060 | + "name": "user_id", |
| 1061 | + "type": "integer", |
| 1062 | + "primaryKey": false, |
| 1063 | + "notNull": true |
| 1064 | + }, |
| 1065 | + "emoji": { |
| 1066 | + "name": "emoji", |
| 1067 | + "type": "text", |
| 1068 | + "primaryKey": false, |
| 1069 | + "notNull": true |
| 1070 | + }, |
| 1071 | + "date": { |
| 1072 | + "name": "date", |
| 1073 | + "type": "timestamp (3)", |
| 1074 | + "primaryKey": false, |
| 1075 | + "notNull": true, |
| 1076 | + "default": "now()" |
| 1077 | + } |
| 1078 | + }, |
| 1079 | + "indexes": {}, |
| 1080 | + "foreignKeys": { |
| 1081 | + "reactions_chat_id_chats_id_fk": { |
| 1082 | + "name": "reactions_chat_id_chats_id_fk", |
| 1083 | + "tableFrom": "reactions", |
| 1084 | + "tableTo": "chats", |
| 1085 | + "columnsFrom": [ |
| 1086 | + "chat_id" |
| 1087 | + ], |
| 1088 | + "columnsTo": [ |
| 1089 | + "id" |
| 1090 | + ], |
| 1091 | + "onDelete": "cascade", |
| 1092 | + "onUpdate": "no action" |
| 1093 | + }, |
| 1094 | + "reactions_user_id_users_id_fk": { |
| 1095 | + "name": "reactions_user_id_users_id_fk", |
| 1096 | + "tableFrom": "reactions", |
| 1097 | + "tableTo": "users", |
| 1098 | + "columnsFrom": [ |
| 1099 | + "user_id" |
| 1100 | + ], |
| 1101 | + "columnsTo": [ |
| 1102 | + "id" |
| 1103 | + ], |
| 1104 | + "onDelete": "cascade", |
| 1105 | + "onUpdate": "no action" |
| 1106 | + }, |
| 1107 | + "message_id_fk": { |
| 1108 | + "name": "message_id_fk", |
| 1109 | + "tableFrom": "reactions", |
| 1110 | + "tableTo": "messages", |
| 1111 | + "columnsFrom": [ |
| 1112 | + "chat_id", |
| 1113 | + "message_id" |
| 1114 | + ], |
| 1115 | + "columnsTo": [ |
| 1116 | + "chat_id", |
| 1117 | + "message_id" |
| 1118 | + ], |
| 1119 | + "onDelete": "cascade", |
| 1120 | + "onUpdate": "no action" |
| 1121 | + } |
| 1122 | + }, |
| 1123 | + "compositePrimaryKeys": {}, |
| 1124 | + "uniqueConstraints": { |
| 1125 | + "unique_reaction_per_emoji": { |
| 1126 | + "name": "unique_reaction_per_emoji", |
| 1127 | + "nullsNotDistinct": false, |
| 1128 | + "columns": [ |
| 1129 | + "chat_id", |
| 1130 | + "message_id", |
| 1131 | + "user_id", |
| 1132 | + "emoji" |
| 1133 | + ] |
| 1134 | + } |
| 1135 | + }, |
| 1136 | + "checkConstraints": {} |
1056 | 1137 | }
|
1057 | 1138 | },
|
1058 | 1139 | "enums": {
|
|
1096 | 1177 | "cycle": false
|
1097 | 1178 | }
|
1098 | 1179 | },
|
1099 |
| - "roles": {}, |
1100 |
| - "policies": {}, |
1101 | 1180 | "views": {},
|
1102 | 1181 | "_meta": {
|
1103 | 1182 | "columns": {},
|
|
0 commit comments