Skip to content

Commit

Permalink
Regenerate DAO files using civix (#548)
Browse files Browse the repository at this point in the history
* Regenerate DAO files using civix

CiviVolunteer originally used a hacked version of setup.sh to generate DAO files and SQL from the xml.
That's no longer necessary now, with the command: civix generate:entity-boilerplate
Just had to reorganize the files a little.

* Switch installer to use generated auto_install.sql and update volunteer_need.created column

Switched to the auto-install and auto-uninstall sql files, which required fixing the default value
of the created column. Also updated the BAO and added an upgrade step to fix the column.

This required a core version compatibility bump to 5.28 which requires the mysql version which
supports multiple CURRENT_TIMESTAMP defaults in a single table.
  • Loading branch information
colemanw authored Feb 5, 2021
1 parent 9867ee9 commit e03d9f5
Show file tree
Hide file tree
Showing 17 changed files with 560 additions and 396 deletions.
3 changes: 0 additions & 3 deletions CRM/Volunteer/BAO/Need.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ function __construct() {
static function &create($params) {
// these metadata fields are managed; don't accept them as params
unset($params['created'], $params['last_updated']);
if (empty($params['id'])) {
$params['created'] = CRM_Utils_Date::currentDBDate();
}

$need = new CRM_Volunteer_BAO_Need();
$need->copyValues($params);
Expand Down
Loading

0 comments on commit e03d9f5

Please sign in to comment.