ALTER TABLE medreport.connected_online_reservation
ADD COLUMN medusa_cart_line_item_id TEXT references public.cart_line_item(id);

ALTER TABLE medreport.connected_online_reservation
ADD COLUMN location_sync_id bigint;

create type medreport.connected_online_order_status as enum ('PENDING', 'CONFIRMED', 'REJECTED', 'CANCELLED');

ALTER TABLE medreport.connected_online_reservation
ADD COLUMN status medreport.connected_online_order_status not null;

ALTER TABLE medreport.connected_online_reservation ALTER COLUMN booking_code DROP NOT NULL;
ALTER TABLE medreport.connected_online_reservation ALTER COLUMN requires_payment DROP NOT NULL;
ALTER TABLE medreport.connected_online_reservation ALTER COLUMN service_user_id SET NOT NULL;
