BEGIN;

alter table role add column status varchar(8);
update role set status = 'active' where status IS NULL;
alter table role alter column status set NOT NULL;
alter table role alter column status set default 'active';
alter table role add constraint role_status_check CHECK (status IN ('active','deleted'));

COMMIT;
