Page MenuHomePhabricator

Generate expected and comparison schemata
ClosedPublic

Authored by epriestley on Sep 15 2014, 2:54 PM.

Details

Summary

Ref T1191. This builds on the "view of the database as it exists" by building a view of the database as it is expected to exist (this is mostly empty for now) and comparing the two. We now render a view of the "comparison schema", which is the actual schema merged with the expected schema and annotated with the differences.

(I'm merging them like this because it makes it easier to handle both "missing" and "surpulus" warnings in a consistent way. If we tried to annotate just the actual or expected schema, the absence of components which are expected to exist is messy to handle.)

Test Plan

See screenshots.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Generate expected and comparison schemata.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.

Screen_Shot_2014-09-15_at_7.50.58_AM.png (1×1 px, 137 KB)

Screen_Shot_2014-09-15_at_7.50.55_AM.png (1×1 px, 169 KB)

Screen_Shot_2014-09-15_at_7.50.53_AM.png (1×1 px, 156 KB)

Screen_Shot_2014-09-15_at_7.50.49_AM.png (1×1 px, 239 KB)

src/applications/config/controller/PhabricatorConfigDatabaseController.php
394

(I'll tidy this up a little later.)

btrahan edited edge metadata.
btrahan added inline comments.
src/applications/config/schema/PhabricatorConfigSchemaQuery.php
152–155

is it possible to have neither of these initialized?

This revision is now accepted and ready to land.Sep 16 2014, 6:34 PM
src/applications/config/schema/PhabricatorConfigSchemaQuery.php
152–155

One or the other will always exist, because $database_name will only exist if at least one map has a corresponding database.

This revision was automatically updated to reflect the committed changes.