infoalloggi-monorepo/apps/db/migrations/21_servizio_updates.up.sql
Marco Pedone 3d70810937 feat(migrations): Add multiple database migrations for new tables and data seeding
- Created migration scripts for new tables including banlist, banners, event_queue, flags, testi_e_stringhe, and ratelimiter.
- Added data seeding for banners, etichette, flags, prezziario, and testi_e_stringhe with idempotent inserts.
- Initialized database with necessary extensions and user tables.
- Updated servizio table to include new columns for managing service states.
- Established foreign key relationships and unique constraints across various tables.
- Implemented sequences for auto-incrementing primary keys in several tables.
2025-10-30 19:14:31 +01:00

13 lines
No EOL
534 B
SQL

-- TASK: Add scadenza_motivazione_transitoria, skipPayment, skipControlloDoc, skipDocMotivazione columns to servizio table
ALTER TABLE IF EXISTS public.servizio
ADD COLUMN scadenza_motivazione_transitoria TIMESTAMP WITHOUT TIME ZONE;
ALTER TABLE IF EXISTS public.servizio
ADD COLUMN "skipPayment" boolean NOT NULL DEFAULT FALSE;
ALTER TABLE IF EXISTS public.servizio
ADD COLUMN "skipControlloDoc" boolean NOT NULL DEFAULT FALSE;
ALTER TABLE IF EXISTS public.servizio
ADD COLUMN "skipDocMotivazione" boolean NOT NULL DEFAULT FALSE;