infoalloggi-monorepo/apps/infoalloggi/migration.sql
Marco Pedone bd5a35a172 Refactor service document handling and contact modal
- Removed temp_tokens data from SQL initialization.
- Updated AllegatiComp to invalidate additional service announcements on file removal.
- Simplified imports in interactions.tsx and removed unused components.
- Enhanced ServizioContent layout for better display of announcements.
- Adjusted button styles in servizio_annunci_accordions for responsiveness.
- Streamlined ricerca-table by removing unnecessary ServizioProvider wrapping.
- Modified upload modal to support new upload callback structure.
- Added new document reference fields to Servizio schema.
- Introduced UsersStorageUserStorageId type for better type safety.
- Updated servizio.controller to include document references in service announcements.
- Changed storage.controller to return user_storage_id on conflict.
- Updated docker-compose to streamline storage service configuration.
- Created migration script for new foreign key constraints on document references.
- Implemented ContattiProprietarioModal to manage document uploads and contact unlocking.
2025-10-29 09:39:06 +01:00

20 lines
No EOL
692 B
SQL

ALTER TABLE
IF EXISTS public.servizio
ADD
CONSTRAINT servizio_doc_fronte FOREIGN KEY (doc_personale_fronte_ref) REFERENCES public.users_storage ("storageId") MATCH SIMPLE ON UPDATE CASCADE ON DELETE
SET
NULL NOT VALID;
ALTER TABLE
IF EXISTS public.servizio
ADD
CONSTRAINT servizio_doc_retro FOREIGN KEY (doc_personale_retro_ref) REFERENCES public.users_storage ("storageId") MATCH SIMPLE ON UPDATE CASCADE ON DELETE
SET
NULL NOT VALID;
ALTER TABLE
IF EXISTS public.servizio
ADD
CONSTRAINT servizio_doc_motivazione FOREIGN KEY (doc_motivazione_ref) REFERENCES public.users_storage ("storageId") MATCH SIMPLE ON UPDATE CASCADE ON DELETE
SET
NULL NOT VALID;