HomePhorge

Store Phriction max version on Document, improve editing rules for editing…

Description

Store Phriction max version on Document, improve editing rules for editing documents with drafts

Summary:
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.

Test Plan:

  • Ran migration.
  • Edited a draft page without hitting any weird version errors.
  • Checked database for sensible maxVersion values.

Reviewers: amckinley

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T13077

Differential Revision: https://secure.phabricator.com/D19625

Details

Provenance
epriestleyAuthored on Aug 30 2018, 9:53 AM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rP0a77b0e53e7f: Work around an issue in MariaDB where dropping a column from a UNIQUE KEY fails
Branches
Unknown
Tags
Unknown

Event Timeline