From 5ec1b6d55b4730c12b034f88a9b502a5d75262d9 Mon Sep 17 00:00:00 2001 From: moojttaba Date: Wed, 3 Jun 2026 23:14:06 +0330 Subject: [PATCH] =?UTF-8?q?docs:=20activity=20log=20=E2=80=94=20backend=20?= =?UTF-8?q?v2.8.71=20(template-creation=20500=20/=20CHECK=20constraints)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- 09 - Audits/Activity Log.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/09 - Audits/Activity Log.md b/09 - Audits/Activity Log.md index 77cf256..f388c14 100644 --- a/09 - Audits/Activity Log.md +++ b/09 - Audits/Activity Log.md @@ -1073,4 +1073,22 @@ the new device shows (frontend surfaces backend message verbatim). --- +### 2026-06-03 — backend v2.8.71 — fix template-creation 500 (blank optional fields vs CHECK constraints) + +Seller "create request template" returned HTTP 500 whenever optional fields were +left empty. The request_templates table has CHECK constraints that allow only +NULL or a valid pattern — product_link (`~ '^https?://.+'`) and delivery_email +(email regex) — and the nullable service_session_type enum rejects ''. Both +DrizzleMarketplaceRepo.createRequestTemplate and updateRequestTemplate passed the +form's empty strings straight into the INSERT/UPDATE, tripping the constraints. +Added a `blank()` coercion: blank optional strings → NULL/undefined for +product_link, delivery_email, size/color/brand, service_location/notes, +proposal_title/description, service_session_type; enum columns (product_type, +delivery_type, urgency, budget_currency, metadata_source) fall back to their +defaults instead of receiving ''. +(Confirmed deployed backend is now on the 2.8.x line — logs show v2.8.70.) +**Verification:** backend tsc clean. + +--- +