Page MenuHomePhabricator

Fix almost all remaining schemata issues
ClosedPublic

Authored by epriestley on Sep 28 2014, 4:20 PM.

Diff Detail

Repository
rP Phabricator
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley updated this revision to Diff 25438.Sep 28 2014, 4:20 PM
epriestley retitled this revision from to Fix almost all remaining schemata issues.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
epriestley added inline comments.Sep 28 2014, 4:29 PM
src/applications/auth/storage/PhabricatorAuthProviderConfig.php
35

We control this, and it's never more than 32 characters long.

src/applications/conduit/storage/PhabricatorConduitMethodCallLog.php
18

We control this. The longest method name we have is about 40 characters.

src/applications/config/schema/PhabricatorConfigColumnSchema.php
65–77

Compensates for CHARACTER SET binary being sort of imaginary.

src/applications/config/schema/PhabricatorConfigKeySchema.php
97–102

We now detect overlong keys as a normal issue. Mostly, this allows us to remove them before making schema changes so they don't block column type changes.

I also added FULLTEXT support since we needed it to avoid removing the FULLTEXT index.

src/applications/config/schema/PhabricatorConfigTableSchema.php
48–54

Fixes a bug with HeraldTranscript which had keys and columns with the same name.

src/applications/differential/storage/DifferentialDiffProperty.php
15

We control this and the longest string is fairly short.

src/applications/files/storage/PhabricatorTransformedFile.php
12

We control this and never use more than ~50 characters.

src/applications/herald/controller/HeraldRuleController.php
324–333

Long ago, Herald required each rule name to be unique (sort of). We now have the Hxx disambiguation and can just drop this.

src/applications/herald/storage/HeraldRule.php
39

We control this and it's always short.

48–56

General cleanup:

  • Get the right PHID name.
  • Remove each-rule-must-have-a-unique-name-per-author thing.
  • Rename bizarre ruletype index.
src/applications/herald/storage/transcript/HeraldTranscript.php
108

This was shadowed by a key of the same name.

src/applications/mailinglists/storage/PhabricatorMetaMTAMailingList.php
21–23

It seems reasonable that no mailing list will have a name or address longer than 128 characters.

src/applications/metamta/storage/PhabricatorMetaMTAMail.php
36

We control this and it's always short.

src/applications/owners/storage/PhabricatorOwnersPackage.php
42

Eventually we should probably not require this to be unique, but for now it seems reasonable that packages probably don't have names longer than 128 characters.

src/applications/people/storage/PhabricatorExternalAccount.php
47

We don't control this but it's unlikely that any provider has ids longer than 64 characters.

src/applications/people/storage/PhabricatorUserSchemaSpec.php
29

This isn't unique so just index the first part.

src/applications/phragment/storage/PhragmentFragment.php
18

Prototype app, only affects @hach-que.

src/applications/phragment/storage/PhragmentSnapshot.php
15

As above.

src/applications/phriction/storage/PhrictionContent.php
54

This was shortened to the same length as the document's slug column. Adjust the key.

src/applications/project/storage/PhabricatorProject.php
125

Seems reasonable that no one has project names longer than 255 characters.

src/applications/releeph/storage/ReleephProject.php
33

Prototype app, seems reasonable.

src/applications/repository/storage/PhabricatorRepository.php
100

Nonunique, just index the first bit.

src/applications/repository/storage/PhabricatorRepositoryArcanistProject.php
26

Seems reasonable.

src/applications/repository/storage/PhabricatorRepositoryBranch.php
12

Seems reasonable. This is only used by the saved-lint feature which is hard to use anyway.

src/applications/repository/storage/PhabricatorRepositoryCommitData.php
23

See T6105, plus the key is useles.

src/applications/repository/storage/PhabricatorRepositorySchemaSpec.php
18

You could only hit 64 characters with a 23-character callsign, and there's no UI for this table.

src/applications/search/storage/document/PhabricatorSearchDocumentField.php
25–28

Explicitly mark this fulltext.

src/infrastructure/daemon/workers/storage/PhabricatorWorkerTask.php
20–22

We control these and they're alwasy short.

src/infrastructure/storage/management/workflow/PhabricatorStorageManagementAdjustWorkflow.php
200–234

Various keys need different grammar.

271

derpalerp

src/infrastructure/storage/schema/PhabricatorStorageSchemaSpec.php
11

We control this and they're always short.

Some of these column shortenings may hit issues on user installs, but the design of this migration means that's perfectly fine. All other schema changes will apply cleanly and we can help them fix the issues and/or provide tools to sort the things out, without totaling installs in the meantime.

Slightly later on this patch series I'll also regenerate quickstart.sql so new installs never hit these issues.

btrahan accepted this revision.Sep 30 2014, 5:05 PM
btrahan edited edge metadata.
This revision is now accepted and ready to land.Sep 30 2014, 5:05 PM
This revision was automatically updated to reflect the committed changes.