- Implemented migration to release stuck assigned locomotives.
- Added schedule window phases to train schedules.
- Created booking batch offers table for partial capacity bookings.
- Developed BookingSplitService to handle partial booking offers and splits.
- Introduced BookingWindowService to manage booking window lifecycle and transitions.
- Added BookingBatchOffer entity to represent offers made during booking splits.
- Enhanced locomotive options with warnings for scheduling.
- Created UpcomingWindowsSection component to display upcoming booking windows.
- Added new milestones for 'Transit Permit Uploaded' and 'Export Transport Document Issued' in the clearance milestone catalog.
- Implemented methods in ClearanceMilestoneService to skip milestones and complete them with metadata.
- Updated ContractBookingService to check boundary conditions before booking creation.
- Introduced new endpoints in ContractsController for uploading customs declarations, advising duty, and handling various document uploads.
- Enhanced the UI to support new clearance actions and display relevant components based on milestone statuses.
Make invoices migration idempotent - skip table/index creation if they
already exist. Prevents 'relation already exists' errors on redeployment.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
PostgreSQL doesn't support IF NOT EXISTS on CREATE TYPE AS ENUM.
Query pg_type table to check if enum exists before creating.
Compatible with all PostgreSQL versions.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Allows migration to run when enum already exists in prod DB. Prevents
'type already exists' error on redeployment.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Allows migration to run when enum already exists in prod DB. Prevents
'type already exists' error on redeployment.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>