@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update database.schema doc to include how to upgrade the schema

Summary: plus update the phid section a little

Test Plan: read it, looked good.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1287

Differential Revision: https://secure.phabricator.com/D3629

+26 -1
+26 -1
src/docs/developer/database.diviner
··· 103 103 104 104 Each globally referencable object in Phabricator has its associated PHID 105 105 (Phabricator ID) which serves as a global identifier. We use PHIDs for 106 - referencing data in different databases. PHIDs are stored in table `phid`. 106 + referencing data in different databases. 107 107 108 108 We use both autoincrementing IDs and global PHIDs because each is useful in 109 109 different contexts. Autoincrementing IDs are chronologically ordered and allow 110 110 us to construct short, human-readable object names (like D2258) and URIs. Global 111 111 PHIDs allow us to represent relationships between different types of objects in 112 112 a homogenous way. 113 + 114 + For example, the concept of "subscribers" is more powerfully done with PHIDs 115 + because we could theoretically have users, projects, teams, and more all 116 + as "subscribers" of other objects. Using an ID column we would need to add a 117 + "type" column to avoid ID collision; using PHIDs does not require this 118 + additional column. 113 119 114 120 = Transactions = 115 121 ··· 131 137 Phabricator uses schema denormalization for performance reasons sparingly. Try 132 138 to avoid it if possible. 133 139 140 + = Changing the Schema = 141 + 142 + There are three simple steps to update the schema: 143 + 144 + - Create a `.sql` file in `resources/sql/patches/`. This file should: 145 + - Contain the approprate MySQL commands to update the schema. 146 + - Use `${NAMESPACE}` rather than `Phabricator` for database and table names. 147 + - Use `COLLATE utf8_bin` for any columns that are to be used as identifiers, 148 + such as PHID columns. Otherwise, use `COLLATE utf8_general_ci`. 149 + - Edit `src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php` and 150 + add your patch to @{method@phabricator:PhabricatorBuiltinPatchList::getPatches}. 151 + - Run `bin/storage/upgrade`. 152 + 153 + See the 154 + [[https://secure.phabricator.com/rPb39175342dc5bee0c2246b05fa277e76a7e96ed3 155 + | commit adding policy storage for Paste ]] for a reasonable example of the code 156 + changes. 157 + 134 158 = See Also = 135 159 136 160 * @{class:LiskDAO} 161 + * @{class:PhabricatorPHID}