Files
evig/scripts/db/migrations/047_intake_timeline.sql
g-butandClaude Opus 4.6 45bd7832fe feat: unified intake system, marketplace admin, IT-Hilfe, sidebar cleanup
Major features:
- Unified Device Intake system with AI text/voice extraction, checklist-gated
  publishing, tier change with checklist reset, and audit timeline
- Marketplace admin panel with stats, listing moderation, reports, orders
- IT-Hilfe admin for managing community tech help requests
- Marketplace sell form: AI-assisted listing creation with image upload

Fixes:
- Marketplace image URL validation: accept relative /uploads/ paths (was
  rejecting valid uploads with z.string().url())
- Admin marketplace stats/orders: fix column name mismatch (amount_chf
  not total_cents)
- Metadata title dedup: skip brand prefix when title already contains it
- Remove "Produkte" from admin sidebar (replaced by Geräte-Eingang +
  Marketplace flow)
- Dashboard quick action: "Neues Produkt" → "Neues Gerät" → /admin/intake

Cleanup:
- Delete unused modules: labels.ts, newsletter-status.ts, sensitive-areas.ts,
  role-checks.ts, unified-permissions.ts, mappers.ts, number-sources.ts,
  admin-access.ts, auth middleware, unused hooks
- SSOT consolidation across API routes and config

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 18:56:42 +01:00

11 lines
503 B
SQL

-- Migration 047: Add intake events timeline to inventory_items
-- Stores chronological audit trail for device processing
ALTER TABLE inventory_items
ADD COLUMN IF NOT EXISTS intake_events JSONB DEFAULT '[]';
-- Each event follows: { type, description, userId, userEmail, timestamp, metadata? }
-- Event types: created, checklist_toggled, tier_changed, field_updated, published, note_added
COMMENT ON COLUMN inventory_items.intake_events IS 'Chronological audit trail of intake processing events';