Store Phriction max version on Document, improve editing rules for editing documents with drafts
Ref T13077. We need to know the maximum version of a document in several cases, so denormalize it onto the Document object.
Then clean up some behaviors where we edit a document with, e.g., 7 versions but version 5 is currently published. For now, we: edit starting with version 7, save as version 8, and immediately publish the new version.
- Ran migration.
- Edited a draft page without hitting any weird version errors.
- Checked database for sensible maxVersion values.
Maniphest Tasks: T13077
Differential Revision: https://secure.phabricator.com/D19625