Commit dbbf3ae
fix: extract Prisma.sql queries for $queryRaw calls with Prisma.sql parameters (Prisma v6 upgrade) (calcom#23779)
* fix: extract Prisma.sql queries for calls with Prisma.sql parameters
- Extract SQL queries to separate Prisma.sql variables before passing to
- Fix PrismaPhoneNumberRepository.ts findManyWithUserAccess and findPhoneNumbersFromUserId methods
- Fix PrismaAgentRepository.ts multiple methods with whereCondition parameters
- Fix PermissionRepository.ts checkRolePermissions and getTeamIdsWithPermissions methods
- Fix virtual-queues.ts getUserRelevantTeamRoutingForms method
- Fix tasker/repository.ts hasNewerScanTaskForStepId method
- Add missing Prisma imports where needed
- Fix lint warnings: replace any with JsonValue and use explicit select for permissions
- Skip primitive parameter cases as instructed
- Compatible with Prisma v6 requirements
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* revert unnecessary changes
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>1 parent c3985e3 commit dbbf3ae
2 files changed
Lines changed: 21 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
| |||
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
129 | | - | |
| 131 | + | |
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
| |||
141 | 143 | | |
142 | 144 | | |
143 | 145 | | |
| 146 | + | |
| 147 | + | |
144 | 148 | | |
145 | 149 | | |
146 | 150 | | |
| |||
227 | 231 | | |
228 | 232 | | |
229 | 233 | | |
230 | | - | |
| 234 | + | |
231 | 235 | | |
232 | 236 | | |
233 | 237 | | |
| |||
251 | 255 | | |
252 | 256 | | |
253 | 257 | | |
| 258 | + | |
| 259 | + | |
254 | 260 | | |
255 | 261 | | |
256 | 262 | | |
| |||
343 | 349 | | |
344 | 350 | | |
345 | 351 | | |
346 | | - | |
| 352 | + | |
347 | 353 | | |
348 | 354 | | |
349 | 355 | | |
| |||
366 | 372 | | |
367 | 373 | | |
368 | 374 | | |
| 375 | + | |
| 376 | + | |
369 | 377 | | |
370 | 378 | | |
371 | 379 | | |
| |||
464 | 472 | | |
465 | 473 | | |
466 | 474 | | |
467 | | - | |
| 475 | + | |
468 | 476 | | |
469 | 477 | | |
470 | 478 | | |
| |||
479 | 487 | | |
480 | 488 | | |
481 | 489 | | |
| 490 | + | |
| 491 | + | |
482 | 492 | | |
483 | 493 | | |
484 | 494 | | |
| |||
494 | 504 | | |
495 | 505 | | |
496 | 506 | | |
497 | | - | |
| 507 | + | |
498 | 508 | | |
499 | 509 | | |
500 | 510 | | |
| |||
509 | 519 | | |
510 | 520 | | |
511 | 521 | | |
| 522 | + | |
| 523 | + | |
512 | 524 | | |
513 | 525 | | |
514 | 526 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
357 | | - | |
| 357 | + | |
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
| 376 | + | |
| 377 | + | |
376 | 378 | | |
377 | 379 | | |
378 | 380 | | |
| |||
0 commit comments