bin/regen.sh - Execute GenerateData.php with a dummy CMS
authorTim Otten <totten@civicrm.org>
Mon, 23 May 2016 22:36:21 +0000 (15:36 -0700)
committerTim Otten <totten@civicrm.org>
Sat, 28 May 2016 01:24:52 +0000 (18:24 -0700)
commite5d2838715ac4f9e714c5c1c2f022d76eac77dd8
tree1c4d27fb5bd81541393d2e321b012387105bc7c2
parent0a48c71e793d30427740e1bb5b971d7356a15f7a
bin/regen.sh - Execute GenerateData.php with a dummy CMS

1. This addresses the error [PHP Fatal error:  Call to undefined function db_query() in /opt/buildkit/build/mytestbuild/sites/all/modules/civicrm/CRM/Utils/System/DrupalBase.php](http://civicrm.stackexchange.com/questions/11972/regen-sh-call-to-undefined-function-db-query/11986#11986).

2.  Generally, the goal here is to produce `civicrm_generated.mysql`, which
is used on any/all CMS's to initialize the Civi database.  If the generation
were really dependent on Drupal 7, then we wouldn't be able to use that
output on other CMS's, right?  Thus I'm hopeful that we can generate
`civicrm_generated.mysql` with any `CIVICRM_UF`.  And the `UnitTests` UF has
fewer dependencies/interactions.

3. Since `GenerateData.php` is running in a dummy CMS, we can remove
these weird mock-drupal-functions.

4. To test, I ran `regen.sh` and compared the output with the old one.
All the changes looked like random-data (`civicrm_contact`, etal) and
not structural data (`civicrm_option_value`, etal).
bin/regen.sh
sql/GenerateData.php