Skip to main content

Version visualization

History

You want to understand how the schema of a system has evolved over time. As long as the diagram is modularized with imports, such a visualization is easy to whip up.

  • history.d2
  • users.d2 (latest version, 0.2)
  • users.d2 (0.1)

Since you want how users.d2 looked like at v0.1, you use git to get that version:

Users Table (v0.1)Users Table (current)usersidintPKemailstringnamestringverified_emailbooleanpasswordstringcreated_attimestampusersidintPKemailintFKnamestringpasswordtextcreated_attimestamplast_updatedtimestampemailsidintPK, UNQlocalstringdomainstringverifiedboolean

Compare

You're a manager at Apple who has two teams secretly working on the same product for multiple years. After years of iterating in their silos, you form a committee to compare the two results. The evaluation starts by comparing their design decisions in an overarching diagram projected in a dark room behind a closed door.

  • compare.d2

And then you checkout the corresponding diagrams from the different repositories.

The rendered diagram is left as an exercise to the reader.