CREATE TYPE permission_flag AS ENUM (
    'READ_REQUESTS'
);

CREATE TABLE user_permissions (
    biz_id bigint NOT NULL,
    passport_uid bigint NOT NULL,
    flags permission_flag[] NOT NULL,
    CONSTRAINT permission_pkey PRIMARY KEY (biz_id, passport_uid)
);

CREATE INDEX IF NOT EXISTS user_permissions_biz_id_idx ON user_permissions (biz_id);
