1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-21 13:00:56 +01:00
phorge-phorge/resources/sql/patches/20130711.pholioimageobsolete.sql
Bob Trahan df264d8548 Pholio - support editing images - fixes T3489
Summary:
Nice title. We add three new transactions - IMAGE_FILE, IMAGE_NAME, and IMAGE_DESCRIPTION. The first is a bit like subscribers as it is a list of file phids. The latter have values of the form ($file_phid => $data), where $data is $name or $description respectively. This is because we need to collate transactions based on $file_phid...

Overall, this uses the _underyling files_ and not the "PholioImage" to determine if things are unique or not. That said, simply mark PholioImages as obsolete so inline comments about no-longer applicable PholioImages don't break.

Does a reasonable job implementing the mock. Note you can't "update" an image at this time, though you can delete and add at will.

Test Plan: played with pholio a ton.

Reviewers: epriestley

Reviewed By: epriestley

CC: chad, aran, Korvin

Maniphest Tasks: T3489

Differential Revision: https://secure.phabricator.com/D6441
2013-07-16 13:31:20 -07:00

14 lines
467 B
SQL

ALTER TABLE {$NAMESPACE}_pholio.pholio_image
ADD `isObsolete` TINYINT(1) NOT NULL DEFAULT '0';
ALTER TABLE {$NAMESPACE}_pholio.pholio_image
DROP KEY `mockID`;
ALTER TABLE {$NAMESPACE}_pholio.pholio_image
ADD KEY `mockID` (`mockID`, `isObsolete`, `sequence`);
ALTER TABLE {$NAMESPACE}_pholio.pholio_image
ADD `phid` VARCHAR(64) NOT NULL COLLATE utf8_bin AFTER `id`;
ALTER TABLE {$NAMESPACE}_pholio.pholio_image
CHANGE `mockID` `mockID` INT(10) UNSIGNED;