ALTER TABLE bgp_community RENAME COLUMN community TO name;

ALTER TABLE bgp_community ADD COLUMN kind TEXT NOT NULL DEFAULT 'large';

UPDATE bgp_community SET kind = 'large' WHERE trim(kind) = '';

ALTER TABLE bgp_community DROP COLUMN title;

ALTER TABLE bgp_community ADD CONSTRAINT bgp_community_kind_chk CHECK (length(trim(kind)) > 0);
