remove zap/downzap subname case sensitivity

This commit is contained in:
k00b 2025-04-08 09:38:31 -05:00
parent 5f2c8bf380
commit 9df5a52bd3
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ export async function onPaid ({ invoice, actId }, { tx }) {
// denormalize downzaps
await tx.$executeRaw`
WITH territory AS (
SELECT COALESCE(r."subName", i."subName", 'meta')::TEXT as "subName"
SELECT COALESCE(r."subName", i."subName", 'meta')::CITEXT as "subName"
FROM "Item" i
LEFT JOIN "Item" r ON r.id = i."rootId"
WHERE i.id = ${itemAct.itemId}::INTEGER

View File

@ -151,7 +151,7 @@ export async function onPaid ({ invoice, actIds }, { tx }) {
// NOTE: for the rows that might be updated by a concurrent zap, we use UPDATE for implicit locking
await tx.$queryRaw`
WITH territory AS (
SELECT COALESCE(r."subName", i."subName", 'meta')::TEXT as "subName"
SELECT COALESCE(r."subName", i."subName", 'meta')::CITEXT as "subName"
FROM "Item" i
LEFT JOIN "Item" r ON r.id = i."rootId"
WHERE i.id = ${itemAct.itemId}::INTEGER