Files
LWLT-AIBOT/control-plane/migrations/024_arrangement_update_routes.sql
2026-09-11 21:22:14 +08:00

63 lines
2.0 KiB
SQL

-- Register four Program-only arrangement update routes.
-- Existing create or hotel-update grants do not grant these new capabilities.
ALTER TABLE business_parser_settings
DROP CONSTRAINT IF EXISTS business_parser_settings_route_check;
ALTER TABLE business_parser_settings
ADD CONSTRAINT business_parser_settings_route_check CHECK (route_id IN (
'team_order_create',
'team_order_batch_create',
'shared_plan_create',
'shared_child_order_create',
'shared_child_order_batch_create',
'passenger_list_import_independent',
'passenger_list_import_shared_child',
'arrangement_guide_create',
'arrangement_guide_update',
'arrangement_vehicle_create',
'arrangement_vehicle_update',
'arrangement_hotel_create',
'arrangement_transport_create',
'arrangement_transport_update',
'arrangement_other_create',
'arrangement_other_update',
'order_update_shared_plan',
'order_update_shared_child',
'order_update_independent',
'arrangement_hotel_update',
'order_cancel',
'order_restore',
'confirmation_export'
));
ALTER TABLE user_business_route_authorizations
DROP CONSTRAINT IF EXISTS user_business_route_authorizations_route_check;
ALTER TABLE user_business_route_authorizations
ADD CONSTRAINT user_business_route_authorizations_route_check CHECK (route_id IN (
'team_order_create',
'team_order_batch_create',
'shared_plan_create',
'shared_child_order_create',
'shared_child_order_batch_create',
'passenger_list_import_independent',
'passenger_list_import_shared_child',
'arrangement_guide_create',
'arrangement_guide_update',
'arrangement_vehicle_create',
'arrangement_vehicle_update',
'arrangement_hotel_create',
'arrangement_transport_create',
'arrangement_transport_update',
'arrangement_other_create',
'arrangement_other_update',
'order_update_shared_plan',
'order_update_shared_child',
'order_update_independent',
'arrangement_hotel_update',
'order_cancel',
'order_restore',
'confirmation_export'
));