Skip to content

Commit

Permalink
Update prisma/migrations/20250305175301/migration.sql
Browse files Browse the repository at this point in the history
Co-authored-by: ekzyis <[email protected]>
  • Loading branch information
Scroogey-SN and ekzyis authored Mar 7, 2025
1 parent 9bb516f commit 991c6bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prisma/migrations/20250305175301/migration.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ BEGIN

SELECT count(*) INTO repeats
FROM "Item"
JOIN "Sub" ON "Sub"."name" = "Item"."subName"
LEFT JOIN "Sub" ON "Sub"."name" = "Item"."subName"
WHERE (
(parent_id IS NULL AND "parentId" IS NULL)
OR
("parentId" = parent_id AND user_id <> (SELECT i."userId" FROM "Item" i WHERE i.id = "Item"."rootId"))
)
AND "Item"."userId" = user_id
AND "bio" = 'f'
AND "Sub"."userId" <> user_id
AND ("Sub"."name" IS NULL OR "Sub"."userId" <> user_id)
AND "Item".created_at > now_utc() - within;

IF parent_id IS NULL THEN
Expand Down

0 comments on commit 991c6bc

Please sign in to comment.