CREATE TABLE IF NOT EXISTS user_relation (
    id BIGSERIAL PRIMARY KEY,
    "user" UUID NOT NULL,
    target UUID NOT NULL,
    relation_type VARCHAR(255) NOT NULL,
    created_at TIMESTAMPTZ NOT NULL
);

CREATE INDEX idx_user_relation_user ON user_relation ("user");
CREATE INDEX idx_user_relation_target ON user_relation (target);
