fixing switch from household to rescue

This commit is contained in:
blaisadmin
2026-04-15 22:23:16 -04:00
parent 31464d9940
commit f9ca2e6298
@@ -198,12 +198,12 @@ export const updateWorkspace = async ({
const result = await db.query<WorkspaceRow>(
`UPDATE workspaces
SET name = $2,
workspace_type = $3,
workspace_type = $3::varchar,
billing_email = $4,
billing_plan = $5,
billing_plan = $5::varchar,
rescue_verification_status = CASE
WHEN $3 = 'rescue' AND rescue_verification_status = 'not_required' THEN 'pending'
WHEN $3 = 'standard' THEN 'not_required'
WHEN $3::varchar = 'rescue' AND rescue_verification_status = 'not_required' THEN 'pending'
WHEN $3::varchar = 'standard' THEN 'not_required'
ELSE rescue_verification_status
END,
updated_at = CURRENT_TIMESTAMP