ALTER TABLE users
    ADD COLUMN IF NOT EXISTS ap_id        TEXT UNIQUE,
    ADD COLUMN IF NOT EXISTS inbox_url    TEXT,
    ADD COLUMN IF NOT EXISTS public_key   TEXT,
    ADD COLUMN IF NOT EXISTS private_key  TEXT,
    ADD COLUMN IF NOT EXISTS local        BOOLEAN NOT NULL DEFAULT true;

ALTER TABLE thoughts
    ADD COLUMN IF NOT EXISTS in_reply_to_id  UUID REFERENCES thoughts(id),
    ADD COLUMN IF NOT EXISTS in_reply_to_url TEXT,
    ADD COLUMN IF NOT EXISTS ap_id           TEXT UNIQUE,
    ADD COLUMN IF NOT EXISTS visibility      TEXT NOT NULL DEFAULT 'public',
    ADD COLUMN IF NOT EXISTS content_warning TEXT,
    ADD COLUMN IF NOT EXISTS sensitive       BOOLEAN NOT NULL DEFAULT false,
    ADD COLUMN IF NOT EXISTS local           BOOLEAN NOT NULL DEFAULT true,
    ADD COLUMN IF NOT EXISTS updated_at      TIMESTAMPTZ;

ALTER TABLE follows
    ADD COLUMN IF NOT EXISTS state      TEXT        NOT NULL DEFAULT 'accepted',
    ADD COLUMN IF NOT EXISTS ap_id      TEXT,
    ADD COLUMN IF NOT EXISTS created_at TIMESTAMPTZ NOT NULL DEFAULT NOW();
