Page MenuHomePhabricator

Maniphest - kill TYPE_PROJECTS
ClosedPublic

Authored by btrahan on Dec 22 2014, 7:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 15, 10:39 PM
Unknown Object (File)
Sun, Mar 31, 2:25 AM
Unknown Object (File)
Fri, Mar 29, 1:26 AM
Unknown Object (File)
Thu, Mar 28, 6:57 PM
Unknown Object (File)
Sun, Mar 24, 6:31 AM
Unknown Object (File)
Feb 19 2024, 2:54 PM
Unknown Object (File)
Feb 18 2024, 11:33 PM
Unknown Object (File)
Feb 18 2024, 11:32 PM
Subscribers
Tokens
"Haypence" token, awarded by chad.

Details

Summary

Fixes T5245. Migrate old TYPE_PROJECTS transaction to new style edge transactions. Kill remaining rendering code.

Test Plan

issued some fun queries to get some old-style transaction in my install:

// go from nothing to 1
INSERT INTO maniphest_transaction (phid, authorPHID, objectPHID, viewPolicy, editPolicy, commentVersion, transactionType, oldValue, newValue, contentSource, metadata, dateCreated, dateModified)
VALUES ('PHID-XACT-TASK-000000000000000', 'PHID-USER-zo35vxnoi4bxqak6yqhc', 'PHID-TASK-hb5wphctibxxqryo6ssi', 'users', 'users', 0, 'projects', '[]', '["PHID-PROJ-4teaxbjk5okv7mdz2qlx"]', '', '{}', 1419274578, 1419274578)

// go from 1 to 2
INSERT INTO maniphest_transaction (phid, authorPHID, objectPHID, viewPolicy, editPolicy, commentVersion, transactionType, oldValue, newValue, contentSource, metadata, dateCreated, dateModified)
VALUES ('PHID-XACT-TASK-111111111111111', 'PHID-USER-zo35vxnoi4bxqak6yqhc', 'PHID-TASK-hb5wphctibxxqryo6ssi', 'users', 'users', 0, 'projects', '["PHID-PROJ-4teaxbjk5okv7mdz2qlx"]', '["PHID-PROJ-4teaxbjk5okv7mdz2qlx", "PHID-PROJ-a7giqlyyfirqswg6gn6x"]', '', '{}', 1419274580, 1419274580)

// swap 1 for 1 with 2 in set
INSERT INTO maniphest_transaction (phid, authorPHID, objectPHID, viewPolicy, editPolicy, commentVersion, transactionType, oldValue, newValue, contentSource, metadata, dateCreated, dateModified)
VALUES ('PHID-XACT-TASK-222222222222222', 'PHID-USER-zo35vxnoi4bxqak6yqhc', 'PHID-TASK-hb5wphctibxxqryo6ssi', 'users', 'users', 0, 'projects', '["PHID-PROJ-4teaxbjk5okv7mdz2qlx", "PHID-PROJ-a7giqlyyfirqswg6gn6x"]', '["PHID-PROJ-4teaxbjk5okv7mdz2qlx", "PHID-PROJ-cety4gr55gpxzhwtrkhx"]', '', '{}', 1419274582, 1419274582)

// go from 2 to 1
INSERT INTO maniphest_transaction (phid, authorPHID, objectPHID, viewPolicy, editPolicy, commentVersion, transactionType, oldValue, newValue, contentSource, metadata, dateCreated, dateModified)
VALUES ('PHID-XACT-TASK-333333333333333', 'PHID-USER-zo35vxnoi4bxqak6yqhc', 'PHID-TASK-hb5wphctibxxqryo6ssi', 'users', 'users', 0, 'projects', '["PHID-PROJ-4teaxbjk5okv7mdz2qlx", "PHID-PROJ-cety4gr55gpxzhwtrkhx"]', '["PHID-PROJ-4teaxbjk5okv7mdz2qlx"]', '', '{}', 1419274584, 1419274584)

took a screenshot. ran the migration script and compared the screenshots and things looked correctly migrated...!

old style:

Screen_Shot_2014-12-22_at_11.16.58_AM.png (1×1 px, 402 KB)

new style:

Screen_Shot_2014-12-22_at_11.41.40_AM.png (1×1 px, 413 KB)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

btrahan retitled this revision from to Maniphest - kill TYPE_PROJECTS.
btrahan updated this object.
btrahan edited the test plan for this revision. (Show Details)
btrahan added a reviewer: epriestley.
epriestley edited edge metadata.
epriestley added inline comments.
resources/sql/autopatches/20141222.maniphestprojtxn.php
32

Although I doubt this will ever collide, maybe consider calling this "mig20141222_build_edge_data_blarfhbefnewlf()" (that is, something very-unique), since it will theoretically cause hard-to-detect problems if any other patch ever defines a build_edge_data() funciton.

This revision is now accepted and ready to land.Dec 22 2014, 7:50 PM
btrahan edited the test plan for this revision. (Show Details)
btrahan edited edge metadata.

scope the helper function name better

This revision was automatically updated to reflect the committed changes.