mirror of
https://github.com/bitbaum/evig.git
synced 2026-12-04 11:58:07 +01:00
Add comprehensive input validation across all high-priority API routes: - Create 12 domain-specific schema files (payments, appointments, reviews, workshops, messages, user, repairer, seller, blog, ai, inventory, common) - Add validateBody/validateQuery helpers with structured German error responses - Wire validation into 20+ route files replacing manual field-presence checks - Add discriminated union schema for appointment PATCH actions - Standardize payment route error messages to German - Fix lint errors in CategoryForm and RegistrationWizard (setState in useEffect) - Extract thick route handlers to service layer (seller, inventory, orders) - Add loading states to admin and dashboard pages - Add 67 unit tests covering all schemas with valid/invalid/default cases Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
12 lines
516 B
SQL
12 lines
516 B
SQL
-- Migration 023: Fix users table trigger
|
|
--
|
|
-- The users table uses camelCase column names from Auth.js adapter ("updatedAt")
|
|
-- but the update_updated_at_column() trigger references snake_case "updated_at".
|
|
-- This causes ALL updates to the users table to fail with:
|
|
-- ERROR: record "new" has no field "updated_at"
|
|
--
|
|
-- Fix: Drop the mismatched trigger. The application code already handles
|
|
-- setting "updatedAt" = NOW() explicitly in UPDATE queries.
|
|
|
|
DROP TRIGGER IF EXISTS update_users_updated_at ON users;
|