@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

Add missing RepositoryURI table + run storage adjustments in tests

Summary:
Fixes T10830. Ref T10366. I wasn't writing to this table yet so I didn't build it, but the fact that `bin/storage adjust` would complain slipped my mind.

- Add the table.
- Make the tests run `adjust`. This is a little slow (a few extra seconds) but we could eventually move some steps like this to run server-side only.

Test Plan: Ran `bin/storage upgrade -f`, got a clean `adjust`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10366, T10830

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

+16 -2
+14
resources/sql/autopatches/20160418.repouri.1.sql
··· 1 + CREATE TABLE {$NAMESPACE}_repository.repository_uri ( 2 + id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, 3 + phid VARBINARY(64) NOT NULL, 4 + repositoryPHID VARBINARY(64) NOT NULL, 5 + uri VARCHAR(255) NOT NULL COLLATE {$COLLATE_TEXT}, 6 + builtinProtocol VARCHAR(32) COLLATE {$COLLATE_TEXT}, 7 + builtinIdentifier VARCHAR(32) COLLATE {$COLLATE_TEXT}, 8 + ioType VARCHAR(32) NOT NULL COLLATE {$COLLATE_TEXT}, 9 + displayType VARCHAR(32) NOT NULL COLLATE {$COLLATE_TEXT}, 10 + isDisabled BOOL NOT NULL, 11 + dateCreated INT UNSIGNED NOT NULL, 12 + dateModified INT UNSIGNED NOT NULL, 13 + UNIQUE KEY `key_builtin` (repositoryPHID, builtinProtocol, builtinIdentifier) 14 + ) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};
+1 -1
src/applications/repository/storage/PhabricatorRepositoryURI.php
··· 37 37 return array( 38 38 self::CONFIG_AUX_PHID => true, 39 39 self::CONFIG_COLUMN_SCHEMA => array( 40 - 'uri' => 'text', 40 + 'uri' => 'text255', 41 41 'builtinProtocol' => 'text32?', 42 42 'builtinIdentifier' => 'text32?', 43 43 'ioType' => 'text32',
+1 -1
src/infrastructure/testing/fixture/PhabricatorStorageFixtureScopeGuard.php
··· 11 11 $this->name = $name; 12 12 13 13 execx( 14 - 'php %s upgrade --force --no-adjust --namespace %s', 14 + 'php %s upgrade --force --namespace %s', 15 15 $this->getStorageBinPath(), 16 16 $this->name); 17 17