ALTER TABLE note_revisions
    ADD COLUMN collaboration_client_id VARCHAR(64) NULL,
    ADD COLUMN collaboration_update_id BIGINT NULL,
    ADD UNIQUE INDEX idx_note_revisions_collaboration_update
        (note_id, collaboration_client_id, collaboration_update_id);

ALTER TABLE revisions
    ADD COLUMN collaboration_client_id VARCHAR(64) NULL,
    ADD COLUMN collaboration_update_id BIGINT NULL,
    ADD UNIQUE INDEX idx_revisions_collaboration_update
        (pad_id, collaboration_client_id, collaboration_update_id);
