I want to convert the datatype of a column in a table from text to boolean. The data in the column is 't' for true and 'f' for false.
I tried to convert it with this statement:
ALTER TABLE public.checktypes ALTER COLUMN deleted SET DATA TYPE boolean USING deleted::boolean;
This works for the conversion of the data type just fine. The problem is, all of them are now false. How can I accomplish that, if the value before the conversion is 't', the boolean will set to true?