alter table tags alter noindex set default null; alter table tags alter noindex type INTEGER USING CASE WHEN noindex THEN 1 ELSE 0 END; alter table tags alter noindex set default 0; alter table tags alter top set default null; alter table tags alter top type INTEGER USING CASE WHEN top THEN 1 ELSE 0 END; alter table tags alter top set default 0; alter table tags rename top to notop