GenCode - Reduce merge-conflicts on AllCoreTables
authorTim Otten <totten@civicrm.org>
Tue, 18 Apr 2017 17:00:04 +0000 (10:00 -0700)
committerTim Otten <totten@civicrm.org>
Tue, 18 Apr 2017 17:00:04 +0000 (10:00 -0700)
commit5079ecb1cda338348e4963f7c231e6318953d85a
tree58c007e631a04d48c4884d5992ad3e35b27b98fa
parentc8a0b8847139b36ec5400a72e732c4a85f7082c4
GenCode - Reduce merge-conflicts on AllCoreTables

The previous checksum was based on the full schema spec.  This is
technically safe, but many irrelevant schema changes (such as editing field
comments) will ding the checksum.

The main goal here is to avoid `$template->run()` (line ~44) and its
code-beautifier (which is expensive/slow).  This revised algorithm for
`needsUpdate()` should:

 * Still be "fast enough" (given that it's a singular file built from a simple template)
 * Still be "accurate enough" (given that `getRaw()` is a fair predictor of `run()`)
 * Be less prone to merge-conflics (given that it doesn't use the checksum)
CRM/Core/CodeGen/Reflection.php
CRM/Core/DAO/AllCoreTables.data.php