CREATE TABLE follows (
    follower_did TEXT NOT NULL,
    followed_did TEXT NOT NULL,
    rkey TEXT NOT NULL,
    cid TEXT NOT NULL,
    created_at INTEGER NOT NULL,
    PRIMARY KEY (follower_did, rkey),
    UNIQUE (follower_did, followed_did)
);

CREATE INDEX idx_follows_followed ON follows(followed_did, created_at DESC);
CREATE INDEX idx_follows_follower ON follows(follower_did, created_at DESC);
