Change revision visibility code to conform to the new schema
The new schema is documented at T336714#9100107.
@JEbe-WMF T336714 is now done, unblocking this task.