Skip to content

Commit

Permalink
[NOREF] Revert migration 127 to 4454a5a (#910)
Browse files Browse the repository at this point in the history
fix: reverted migration 127 to 4454a5a
  • Loading branch information
OddTomBrooks authored Jan 22, 2024
1 parent e2641b4 commit 07c7d41
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions migrations/V127__Update_Quality_Performance_Impacts_Payment.sql
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
CREATE TYPE YES_NO_OTHER_TYPE AS ENUM (
'YES',
'NO',
'OTHER'
);

-- Add quality_performance_impacts_payment_other to table
ALTER TABLE plan_ops_eval_and_learning
ADD COLUMN quality_performance_impacts_payment_other zero_string;

-- Alter the quality_performance_impacts_payment column to use new YES_NO_OTHER_TYPE enum instead of BOOL
ALTER TABLE plan_ops_eval_and_learning
ALTER COLUMN quality_performance_impacts_payment TYPE YES_NO_OTHER_TYPE USING (
CASE quality_performance_impacts_payment
WHEN TRUE THEN 'YES'::YES_NO_OTHER_TYPE
WHEN FALSE THEN 'NO'::YES_NO_OTHER_TYPE
END
);
CREATE TYPE YES_NO_OTHER_TYPE AS ENUM (
'YES',
'NO',
'OTHER'
);

-- Add quality_performance_impacts_payment_other to table
ALTER TABLE plan_ops_eval_and_learning
ADD COLUMN quality_performance_impacts_payment_other zero_string;

-- Alter the quality_performance_impacts_payment column to use new YES_NO_OTHER_TYPE enum instead of BOOL
ALTER TABLE plan_ops_eval_and_learning
ALTER COLUMN quality_performance_impacts_payment TYPE YES_NO_OTHER_TYPE USING (
CASE quality_performance_impacts_payment
WHEN TRUE THEN 'YES'::YES_NO_OTHER_TYPE
WHEN FALSE THEN 'NO'::YES_NO_OTHER_TYPE
END
);

0 comments on commit 07c7d41

Please sign in to comment.