Page MenuHomePhabricator

Begin generating meaningful expected schemata
ClosedPublic

Authored by epriestley on Sep 15 2014, 3:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 22, 4:10 PM
Unknown Object (File)
Sun, Apr 21, 3:48 PM
Unknown Object (File)
Wed, Apr 17, 2:43 PM
Unknown Object (File)
Fri, Apr 12, 9:06 PM
Unknown Object (File)
Thu, Apr 11, 7:03 AM
Unknown Object (File)
Thu, Apr 4, 10:07 AM
Unknown Object (File)
Tue, Apr 2, 7:35 AM
Unknown Object (File)
Fri, Mar 29, 12:33 AM
Subscribers

Details

Summary

Ref T1191. This lays some groundwork for generating the expected schemata, so we can compare them to the actual schemata and produce a meaningful diff.

  • In general, each application will subclass PhabricatorConfigSchemaSpec and provide a definition of the tables it expects.
  • This class has helper methods to mostly-automatically build table definitions for Lisk and (in the future) edges.
  • When building expected schema, we specify a "data type", like "epoch". This is the type of data the application stores in the column, from the application's point of view. The SchemaSpec converts this into the best avilable storage type: for example, "text" will translate to utf8mb4 if it's availalbe, or binary if not. This gives us a layer of indirection to insulate us from craziness.
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 Begin generating meaningful expected schemata.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.
btrahan added inline comments.
src/applications/differential/storage/DifferentialSchemaSpec.php
8

i know whats coming soon

This revision is now accepted and ready to land.Sep 16 2014, 6:36 PM
src/applications/differential/storage/DifferentialSchemaSpec.php
8

hehe

This revision was automatically updated to reflect the committed changes.