Previously they were ordered by major_version DESC, minor_version DESC and updated_at DESC. This caused problems after restoring deleted files as the updated_at field were set to the same for all revisions, and renamed files have the same major and minor version and could therefore be sorted in the wrong order. Why would it not be ordered by id from the start?