I already google\'d aroung a little bit and seems there\'s no satisfying answer for my problem.
I have a table with column of type string. I\'d like to run following
Since I'm using Postgres, I went with SQL solution for now. Query used:
execute 'ALTER TABLE "users" ALTER COLUMN "smoking" TYPE boolean USING CASE WHEN "flatshare"=\'true\' THEN \'t\'::boolean ELSE \'f\'::boolean END'
It works only if one has a field filled with true/false strings (such as default radio button collection helper with forced boolean type would generate)