Page MenuHomePhabricator

Migrate Audit comment text into new storage
ClosedPublic

Authored by epriestley on Jul 22 2014, 8:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 23, 3:59 PM
Unknown Object (File)
Fri, Apr 19, 2:03 AM
Unknown Object (File)
Fri, Apr 19, 2:03 AM
Unknown Object (File)
Fri, Apr 19, 2:03 AM
Unknown Object (File)
Fri, Apr 19, 2:03 AM
Unknown Object (File)
Fri, Apr 19, 2:03 AM
Unknown Object (File)
Mon, Apr 15, 12:31 AM
Unknown Object (File)
Thu, Apr 11, 3:25 AM
Subscribers

Details

Summary

Ref T4896. This is substantially similar to D8196.

Migrate the comment text out of the audit_comment table and into the audit_transaction_comment table. Do double reads on PhabricatorAuditComment so the APIs aren't disturbed. The old table is still updated.

Test Plan
  • Before applying migration, cleared cache and browsed around. Things looked fine, except no comment text.
  • Applied migration.
  • Cleared cache, browsed around, saw all my old comments.
  • Added some new comments.
  • Spot checked migrated and new rows in database.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

epriestley retitled this revision from to Migrate Audit comment text into new storage.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added reviewers: joshuaspence, btrahan.
  • Fix an issue when a commit has no comments.
  • Fix an issue when submitting a transaction with no comment text.
joshuaspence edited edge metadata.
joshuaspence added inline comments.
resources/sql/autopatches/20140722.audit.4.migtext.php
15

Maybe just if (!$row['content'])) {?

This revision is now accepted and ready to land.Jul 23 2014, 1:45 PM
resources/sql/autopatches/20140722.audit.4.migtext.php
15

This will incorrectly destroy the comment "0".

resources/sql/autopatches/20140722.audit.4.migtext.php
15

Oh man... didn't realise that (bool) "0" was false in PHP.

Yeah, PHP is super cool. That's why we have all sorts of strlen(). T.T

epriestley edited edge metadata.
  • Rebase, fix PHIDType class names.
epriestley updated this revision to Diff 24156.

Closed by commit rP3d78c0eff707 (authored by @epriestley).