Page MenuHomePhabricator

Migrate Audit comment text into new storage
ClosedPublic

Authored by epriestley on Jul 22 2014, 8:22 PM.
Tags
None
Referenced Files
F14059101: D10020.diff
Sun, Nov 17, 5:31 PM
F14051401: D10020.id24080.diff
Fri, Nov 15, 12:43 AM
F14050857: D10020.diff
Thu, Nov 14, 9:02 PM
F14037213: D10020.diff
Sun, Nov 10, 2:23 PM
F14034094: D10020.id.diff
Sat, Nov 9, 10:05 PM
F14033971: D10020.id.diff
Sat, Nov 9, 9:06 PM
F14019015: D10020.diff
Tue, Nov 5, 8:56 PM
F13999597: D10020.diff
Thu, Oct 24, 3:51 PM
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
Branch
audit5
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 1887
Build 1888: [Placeholder Plan] Wait for 30 Seconds

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).