@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<?php
2
3final class PhabricatorSearchIndexVersion
4 extends PhabricatorSearchDAO {
5
6 protected $objectPHID;
7 protected $extensionKey;
8 protected $version;
9 protected $indexVersion;
10 protected $indexEpoch;
11
12 protected function getConfiguration() {
13 return array(
14 self::CONFIG_TIMESTAMPS => false,
15 self::CONFIG_COLUMN_SCHEMA => array(
16 'extensionKey' => 'text64',
17 'version' => 'text128',
18 'indexVersion' => 'bytes12',
19 'indexEpoch' => 'epoch',
20 ),
21 self::CONFIG_KEY_SCHEMA => array(
22 'key_object' => array(
23 'columns' => array('objectPHID', 'extensionKey'),
24 'unique' => true,
25 ),
26
27 // NOTE: "bin/search index" may query this table by "indexVersion" or
28 // "indexEpoch", but this is rare and scanning the table seems fine.
29
30 ),
31 ) + parent::getConfiguration();
32 }
33
34}