-- Revert kakeibo:transaction_type_to_integer from pg

BEGIN;

ALTER TABLE kakeibo.transactions ALTER COLUMN type TYPE kakeibo.transaction_type
  USING CASE type WHEN 0 THEN 'outgo'::kakeibo.transaction_type ELSE 'income'::kakeibo.transaction_type END;

COMMIT;
