set search_path=acl, public;
ALTER TABLE policy DROP COLUMN attrs;
ALTER TABLE policy ADD COLUMN aoi_id bigint NOT NULL DEFAULT 0;
CREATE UNIQUE INDEX policy_agent_role_aoi_idx ON policy(agent_id, role_id, aoi_id);
CREATE INDEX policy_agent_index ON policy(agent_id);
CREATE INDEX policy_role_index ON policy(role_id);
CREATE INDEX policy_aoi_index ON policy(aoi_id);
set search_path=public;
