|
1 | 1 | { |
2 | | - "id": "2d5b0a57-97ac-4d5b-905a-d3c6ec78caa3", |
| 2 | + "id": "eb819080-df32-4840-9c03-0fcffd5f113f", |
3 | 3 | "prevId": "00000000-0000-0000-0000-000000000000", |
4 | 4 | "version": "7", |
5 | 5 | "dialect": "postgresql", |
6 | 6 | "tables": { |
7 | | - "public.Chat": { |
8 | | - "name": "Chat", |
| 7 | + "public.chat": { |
| 8 | + "name": "chat", |
9 | 9 | "schema": "", |
10 | 10 | "columns": { |
11 | 11 | "id": { |
12 | 12 | "name": "id", |
13 | | - "type": "text", |
| 13 | + "type": "uuid", |
14 | 14 | "primaryKey": true, |
15 | | - "notNull": true |
| 15 | + "notNull": true, |
| 16 | + "default": "gen_random_uuid()" |
16 | 17 | }, |
17 | 18 | "serialNumber": { |
18 | 19 | "name": "serialNumber", |
19 | | - "type": "integer", |
| 20 | + "type": "serial", |
20 | 21 | "primaryKey": false, |
21 | | - "notNull": true, |
22 | | - "identity": { |
23 | | - "type": "always", |
24 | | - "name": "Chat_serialNumber_seq", |
25 | | - "schema": "public", |
26 | | - "increment": "1", |
27 | | - "startWith": "1", |
28 | | - "minValue": "1", |
29 | | - "maxValue": "2147483647", |
30 | | - "cache": "1", |
31 | | - "cycle": false |
32 | | - } |
| 22 | + "notNull": true |
33 | 23 | }, |
34 | 24 | "content": { |
35 | 25 | "name": "content", |
|
39 | 29 | }, |
40 | 30 | "userId": { |
41 | 31 | "name": "userId", |
42 | | - "type": "text", |
| 32 | + "type": "uuid", |
43 | 33 | "primaryKey": false, |
44 | 34 | "notNull": true |
45 | 35 | }, |
46 | 36 | "roomId": { |
47 | 37 | "name": "roomId", |
48 | | - "type": "text", |
| 38 | + "type": "uuid", |
49 | 39 | "primaryKey": false, |
50 | 40 | "notNull": true |
51 | 41 | }, |
52 | 42 | "createdAt": { |
53 | 43 | "name": "createdAt", |
54 | 44 | "type": "timestamp", |
55 | 45 | "primaryKey": false, |
56 | | - "notNull": true, |
| 46 | + "notNull": false, |
57 | 47 | "default": "now()" |
58 | 48 | } |
59 | 49 | }, |
60 | 50 | "indexes": {}, |
61 | 51 | "foreignKeys": { |
62 | | - "Chat_userId_User_id_fk": { |
63 | | - "name": "Chat_userId_User_id_fk", |
64 | | - "tableFrom": "Chat", |
65 | | - "tableTo": "User", |
| 52 | + "chat_userId_user_id_fk": { |
| 53 | + "name": "chat_userId_user_id_fk", |
| 54 | + "tableFrom": "chat", |
| 55 | + "tableTo": "user", |
66 | 56 | "columnsFrom": [ |
67 | 57 | "userId" |
68 | 58 | ], |
|
72 | 62 | "onDelete": "no action", |
73 | 63 | "onUpdate": "no action" |
74 | 64 | }, |
75 | | - "Chat_roomId_Room_id_fk": { |
76 | | - "name": "Chat_roomId_Room_id_fk", |
77 | | - "tableFrom": "Chat", |
78 | | - "tableTo": "Room", |
| 65 | + "chat_roomId_room_id_fk": { |
| 66 | + "name": "chat_roomId_room_id_fk", |
| 67 | + "tableFrom": "chat", |
| 68 | + "tableTo": "room", |
79 | 69 | "columnsFrom": [ |
80 | 70 | "roomId" |
81 | 71 | ], |
|
92 | 82 | "checkConstraints": {}, |
93 | 83 | "isRLSEnabled": false |
94 | 84 | }, |
95 | | - "public.Draw": { |
96 | | - "name": "Draw", |
| 85 | + "public.draw": { |
| 86 | + "name": "draw", |
97 | 87 | "schema": "", |
98 | 88 | "columns": { |
99 | 89 | "id": { |
|
171 | 161 | }, |
172 | 162 | "points": { |
173 | 163 | "name": "points", |
174 | | - "type": "jsonb", |
| 164 | + "type": "json", |
175 | 165 | "primaryKey": false, |
176 | 166 | "notNull": false |
177 | 167 | }, |
178 | 168 | "roomId": { |
179 | 169 | "name": "roomId", |
180 | | - "type": "text", |
| 170 | + "type": "uuid", |
181 | 171 | "primaryKey": false, |
182 | 172 | "notNull": true |
183 | 173 | } |
184 | 174 | }, |
185 | 175 | "indexes": {}, |
186 | 176 | "foreignKeys": { |
187 | | - "Draw_roomId_Room_id_fk": { |
188 | | - "name": "Draw_roomId_Room_id_fk", |
189 | | - "tableFrom": "Draw", |
190 | | - "tableTo": "Room", |
| 177 | + "draw_roomId_room_id_fk": { |
| 178 | + "name": "draw_roomId_room_id_fk", |
| 179 | + "tableFrom": "draw", |
| 180 | + "tableTo": "room", |
191 | 181 | "columnsFrom": [ |
192 | 182 | "roomId" |
193 | 183 | ], |
|
204 | 194 | "checkConstraints": {}, |
205 | 195 | "isRLSEnabled": false |
206 | 196 | }, |
207 | | - "public._participants": { |
208 | | - "name": "_participants", |
| 197 | + "public.room_participants": { |
| 198 | + "name": "room_participants", |
209 | 199 | "schema": "", |
210 | 200 | "columns": { |
211 | | - "A": { |
212 | | - "name": "A", |
213 | | - "type": "text", |
| 201 | + "roomId": { |
| 202 | + "name": "roomId", |
| 203 | + "type": "uuid", |
214 | 204 | "primaryKey": false, |
215 | 205 | "notNull": true |
216 | 206 | }, |
217 | | - "B": { |
218 | | - "name": "B", |
219 | | - "type": "text", |
| 207 | + "userId": { |
| 208 | + "name": "userId", |
| 209 | + "type": "uuid", |
220 | 210 | "primaryKey": false, |
221 | 211 | "notNull": true |
222 | 212 | } |
223 | 213 | }, |
224 | 214 | "indexes": {}, |
225 | 215 | "foreignKeys": { |
226 | | - "_participants_A_Room_id_fk": { |
227 | | - "name": "_participants_A_Room_id_fk", |
228 | | - "tableFrom": "_participants", |
229 | | - "tableTo": "Room", |
| 216 | + "room_participants_roomId_room_id_fk": { |
| 217 | + "name": "room_participants_roomId_room_id_fk", |
| 218 | + "tableFrom": "room_participants", |
| 219 | + "tableTo": "room", |
230 | 220 | "columnsFrom": [ |
231 | | - "A" |
| 221 | + "roomId" |
232 | 222 | ], |
233 | 223 | "columnsTo": [ |
234 | 224 | "id" |
235 | 225 | ], |
236 | | - "onDelete": "cascade", |
237 | | - "onUpdate": "cascade" |
| 226 | + "onDelete": "no action", |
| 227 | + "onUpdate": "no action" |
238 | 228 | }, |
239 | | - "_participants_B_User_id_fk": { |
240 | | - "name": "_participants_B_User_id_fk", |
241 | | - "tableFrom": "_participants", |
242 | | - "tableTo": "User", |
| 229 | + "room_participants_userId_user_id_fk": { |
| 230 | + "name": "room_participants_userId_user_id_fk", |
| 231 | + "tableFrom": "room_participants", |
| 232 | + "tableTo": "user", |
243 | 233 | "columnsFrom": [ |
244 | | - "B" |
| 234 | + "userId" |
245 | 235 | ], |
246 | 236 | "columnsTo": [ |
247 | 237 | "id" |
248 | 238 | ], |
249 | | - "onDelete": "cascade", |
250 | | - "onUpdate": "cascade" |
| 239 | + "onDelete": "no action", |
| 240 | + "onUpdate": "no action" |
251 | 241 | } |
252 | 242 | }, |
253 | 243 | "compositePrimaryKeys": {}, |
|
256 | 246 | "checkConstraints": {}, |
257 | 247 | "isRLSEnabled": false |
258 | 248 | }, |
259 | | - "public.Room": { |
260 | | - "name": "Room", |
| 249 | + "public.room": { |
| 250 | + "name": "room", |
261 | 251 | "schema": "", |
262 | 252 | "columns": { |
263 | 253 | "id": { |
264 | 254 | "name": "id", |
265 | | - "type": "text", |
| 255 | + "type": "uuid", |
266 | 256 | "primaryKey": true, |
267 | | - "notNull": true |
| 257 | + "notNull": true, |
| 258 | + "default": "gen_random_uuid()" |
268 | 259 | }, |
269 | 260 | "title": { |
270 | 261 | "name": "title", |
|
280 | 271 | }, |
281 | 272 | "adminId": { |
282 | 273 | "name": "adminId", |
283 | | - "type": "text", |
| 274 | + "type": "uuid", |
284 | 275 | "primaryKey": false, |
285 | 276 | "notNull": true |
286 | 277 | }, |
287 | 278 | "createdAt": { |
288 | 279 | "name": "createdAt", |
289 | 280 | "type": "timestamp", |
290 | 281 | "primaryKey": false, |
291 | | - "notNull": true, |
| 282 | + "notNull": false, |
292 | 283 | "default": "now()" |
293 | 284 | } |
294 | 285 | }, |
295 | 286 | "indexes": {}, |
296 | 287 | "foreignKeys": { |
297 | | - "Room_adminId_User_id_fk": { |
298 | | - "name": "Room_adminId_User_id_fk", |
299 | | - "tableFrom": "Room", |
300 | | - "tableTo": "User", |
| 288 | + "room_adminId_user_id_fk": { |
| 289 | + "name": "room_adminId_user_id_fk", |
| 290 | + "tableFrom": "room", |
| 291 | + "tableTo": "user", |
301 | 292 | "columnsFrom": [ |
302 | 293 | "adminId" |
303 | 294 | ], |
|
310 | 301 | }, |
311 | 302 | "compositePrimaryKeys": {}, |
312 | 303 | "uniqueConstraints": { |
313 | | - "Room_joinCode_unique": { |
314 | | - "name": "Room_joinCode_unique", |
| 304 | + "room_joinCode_unique": { |
| 305 | + "name": "room_joinCode_unique", |
315 | 306 | "nullsNotDistinct": false, |
316 | 307 | "columns": [ |
317 | 308 | "joinCode" |
|
322 | 313 | "checkConstraints": {}, |
323 | 314 | "isRLSEnabled": false |
324 | 315 | }, |
325 | | - "public.User": { |
326 | | - "name": "User", |
| 316 | + "public.user": { |
| 317 | + "name": "user", |
327 | 318 | "schema": "", |
328 | 319 | "columns": { |
329 | 320 | "id": { |
330 | 321 | "name": "id", |
331 | | - "type": "text", |
| 322 | + "type": "uuid", |
332 | 323 | "primaryKey": true, |
333 | | - "notNull": true |
| 324 | + "notNull": true, |
| 325 | + "default": "gen_random_uuid()" |
334 | 326 | }, |
335 | 327 | "username": { |
336 | 328 | "name": "username", |
|
361 | 353 | "foreignKeys": {}, |
362 | 354 | "compositePrimaryKeys": {}, |
363 | 355 | "uniqueConstraints": { |
364 | | - "User_username_unique": { |
365 | | - "name": "User_username_unique", |
| 356 | + "user_username_unique": { |
| 357 | + "name": "user_username_unique", |
366 | 358 | "nullsNotDistinct": false, |
367 | 359 | "columns": [ |
368 | 360 | "username" |
|
0 commit comments