diff --git a/migrations/2024-12-18-124527_add_new_value_in_success_based_routing_conclusive_state/down.sql b/migrations/2024-12-18-124527_add_new_value_in_success_based_routing_conclusive_state/down.sql new file mode 100644 index 000000000000..2a3866c86d46 --- /dev/null +++ b/migrations/2024-12-18-124527_add_new_value_in_success_based_routing_conclusive_state/down.sql @@ -0,0 +1,2 @@ +-- This file should undo anything in `up.sql` +SELECT 1; diff --git a/migrations/2024-12-18-124527_add_new_value_in_success_based_routing_conclusive_state/up.sql b/migrations/2024-12-18-124527_add_new_value_in_success_based_routing_conclusive_state/up.sql new file mode 100644 index 000000000000..9e4a259c7ae7 --- /dev/null +++ b/migrations/2024-12-18-124527_add_new_value_in_success_based_routing_conclusive_state/up.sql @@ -0,0 +1,12 @@ +-- Your SQL goes here +DO $$ +BEGIN + IF NOT EXISTS ( + SELECT 1 + FROM pg_enum + WHERE enumlabel = 'non_deterministic' + AND enumtypid = (SELECT oid FROM pg_type WHERE typname = 'SuccessBasedRoutingConclusiveState') + ) THEN + ALTER TYPE "SuccessBasedRoutingConclusiveState" ADD VALUE 'non_deterministic'; + END IF; +END $$;