Page MenuHomePhabricator

Rename `phabricator_repository` database
Closed, WontfixPublic

Description

This is really low value, but we should maybe eventually rename the phabricator_repository database to phabricator_diffusion or consistency.

Revisions and Commits

Event Timeline

joshuaspence raised the priority of this task from to Needs Triage.
joshuaspence triaged this task as Low priority.
joshuaspence updated the task description. (Show Details)
joshuaspence added projects: Diffusion, Database.
joshuaspence added a subscriber: joshuaspence.

As a possible attack on this, we could rename phabricator_pastebin to phabricator_paste first and see how awful that is.

If it's only moderately awful we could phabricator_repository to phabricator_diffusion.

But this feels like it might plausibly never be worth it to me.

I got bored and went ahead with this.

So far, I have come up with two different approaches to this. One of the major issues with this change is that we don't have a way to just connect to an arbitrary database with Lisk. Migrations which expect to change the phabricator_pastebin database, for example, cannot use PhabricatorPaste (which tries to connect to the phabricator_paste database, which doesn't yet exist). Furthermore, theses migrations cannot use LiskRawMigrationIterator either, because there is currently no easy way to construct an AphrontDatabaseConnection which connects to an arbitrary database.

In D13223, I solve this problem by introducing PhabricatorAdHocDAO, which is a lightweight LiskDAO class which provides an explicit setApplicationName method to connect to an arbitrary database within the storage.default-namespace namespace. In D13224, I add an explicit setApplicationName method to PhabricatorLiskDAO, which allows the database to be customized for all LiskDAO objects. Out o these two solutions, I'd probably prefer the former because it is more explicit and less-obtrusive.

eadler added a project: Restricted Project.Aug 5 2016, 5:24 PM
epriestley claimed this task.

This remains desirable, but probably won't happen without a stronger motivator since the patches are somewhat involved.