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)
Mon, Dec 16, 10:11 PM
Unknown Object (File)
Thu, Dec 12, 2:13 AM
Unknown Object (File)
Mon, Dec 9, 5:48 PM
Unknown Object (File)
Sat, Dec 7, 3:10 PM
Unknown Object (File)
Mon, Dec 2, 10:27 PM
Unknown Object (File)
Wed, Nov 27, 5:55 PM
Unknown Object (File)
Tue, Nov 26, 10:39 PM
Unknown Object (File)
Sun, Nov 24, 2:35 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).