infoalloggi-monorepo/apps/db/migrations/47_messages.up.sql
Marco Pedone b3c70bfa1a feat: add admin appunti management page and related functionality
- Introduced a new page for managing appunti in the admin area.
- Created AppuntiProvider to manage appunti state and API interactions.
- Added schemas for appunti and appunti groups.
- Implemented CRUD operations for appunti and appunti groups in the API.
- Removed potenziali related files and services as part of the refactor.
- Updated the public schema to include appunti and appunti groups.
- Improved error handling in the appunti service.

Co-authored-by: Copilot <copilot@github.com>
2026-04-29 15:12:52 +02:00

12 lines
No EOL
376 B
SQL

-- Migration: 47_messages.up.sql
UPDATE public.messages
SET message = ''
WHERE message IS NULL;
ALTER TABLE IF EXISTS public.messages
ALTER COLUMN message SET NOT NULL;
ALTER TABLE IF EXISTS public.messages
ADD COLUMN IF NOT EXISTS reply_to_id UUID REFERENCES messages(messageid) ON DELETE SET NULL,
ADD COLUMN IF NOT EXISTS is_forwarded BOOLEAN NOT NULL DEFAULT FALSE;