From e03d9f5717ff1e7365d0b1685b9ef7ac8f11354d Mon Sep 17 00:00:00 2001 From: colemanw Date: Fri, 5 Feb 2021 12:55:50 -0500 Subject: [PATCH] Regenerate DAO files using civix (#548) * 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. --- CRM/Volunteer/BAO/Need.php | 3 - CRM/Volunteer/DAO/Need.php | 279 +++++++++++------- CRM/Volunteer/DAO/Project.php | 233 +++++++++------ CRM/Volunteer/DAO/ProjectContact.php | 178 ++++++----- CRM/Volunteer/Upgrader.php | 13 +- bin/setup.conf.txt | 17 -- bin/setup.sh | 38 --- info.xml | 3 +- sql/auto_install.sql | 113 +++++++ sql/auto_uninstall.sql | 24 ++ sql/volunteer_install.sql | 26 -- sql/volunteer_uninstall.sql | 7 +- xml/schema/{ => CRM}/Volunteer/Need.xml | 3 +- xml/schema/{ => CRM}/Volunteer/Project.xml | 1 + .../{ => CRM}/Volunteer/ProjectContact.xml | 1 + xml/schema/Schema.xml | 11 - xml/schema/Volunteer/files.xml | 6 - 17 files changed, 560 insertions(+), 396 deletions(-) delete mode 100644 bin/setup.conf.txt delete mode 100755 bin/setup.sh create mode 100644 sql/auto_install.sql create mode 100644 sql/auto_uninstall.sql delete mode 100644 sql/volunteer_install.sql rename xml/schema/{ => CRM}/Volunteer/Need.xml (97%) rename xml/schema/{ => CRM}/Volunteer/Project.xml (98%) rename xml/schema/{ => CRM}/Volunteer/ProjectContact.xml (97%) delete mode 100644 xml/schema/Schema.xml delete mode 100644 xml/schema/Volunteer/files.xml diff --git a/CRM/Volunteer/BAO/Need.php b/CRM/Volunteer/BAO/Need.php index ef5cfd0e..7026522c 100644 --- a/CRM/Volunteer/BAO/Need.php +++ b/CRM/Volunteer/BAO/Need.php @@ -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); diff --git a/CRM/Volunteer/DAO/Need.php b/CRM/Volunteer/DAO/Need.php index 1164ec9a..640ba1c5 100644 --- a/CRM/Volunteer/DAO/Need.php +++ b/CRM/Volunteer/DAO/Need.php @@ -1,309 +1,352 @@ __table = 'civicrm_volunteer_need'; parent::__construct(); } + + /** + * Returns localized title of this entity. + * + * @param bool $plural + * Whether to return the plural version of the title. + */ + public static function getEntityTitle($plural = FALSE) { + return $plural ? E::ts('Volunteer Needs') : E::ts('Volunteer Need'); + } + /** * Returns foreign keys and entity references. * * @return array * [CRM_Core_Reference_Interface] */ - static function getReferenceColumns() { + public static function getReferenceColumns() { if (!isset(Civi::$statics[__CLASS__]['links'])) { - Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__); - Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'project_id', 'civicrm_volunteer_project', 'id'); + Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__); + Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'project_id', 'civicrm_volunteer_project', 'id'); CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']); } return Civi::$statics[__CLASS__]['links']; } + /** * Returns all the column names of this table * * @return array */ - static function &fields() { + public static function &fields() { if (!isset(Civi::$statics[__CLASS__]['fields'])) { - Civi::$statics[__CLASS__]['fields'] = array( - 'id' => array( + Civi::$statics[__CLASS__]['fields'] = [ + 'id' => [ 'name' => 'id', 'type' => CRM_Utils_Type::T_INT, - 'title' => ts('CiviVolunteer Need ID', array('domain' => 'org.civicrm.volunteer')) , - 'description' => 'Need Id', - 'required' => true, + 'title' => E::ts('CiviVolunteer Need ID'), + 'description' => E::ts('Need Id'), + 'required' => TRUE, + 'where' => 'civicrm_volunteer_need.id', 'table_name' => 'civicrm_volunteer_need', 'entity' => 'Need', 'bao' => 'CRM_Volunteer_DAO_Need', - ) , - 'project_id' => array( + 'localizable' => 0, + 'add' => '4.4', + ], + 'project_id' => [ 'name' => 'project_id', 'type' => CRM_Utils_Type::T_INT, - 'description' => 'FK to civicrm_volunteer_project table which contains entity_table + entity for each volunteer project (initially civicrm_event + eventID).', - 'required' => false, + 'description' => E::ts('FK to civicrm_volunteer_project table which contains entity_table + entity for each volunteer project (initially civicrm_event + eventID).'), + 'required' => FALSE, + 'where' => 'civicrm_volunteer_need.project_id', 'table_name' => 'civicrm_volunteer_need', 'entity' => 'Need', 'bao' => 'CRM_Volunteer_DAO_Need', + 'localizable' => 0, 'FKClassName' => 'CRM_Volunteer_DAO_Project', - ) , - 'start_time' => array( + 'add' => '4.4', + ], + 'start_time' => [ 'name' => 'start_time', 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, - 'title' => ts('Start Date and Time', array('domain' => 'org.civicrm.volunteer')) , + 'title' => E::ts('Start Date and Time'), + 'where' => 'civicrm_volunteer_need.start_time', 'table_name' => 'civicrm_volunteer_need', 'entity' => 'Need', 'bao' => 'CRM_Volunteer_DAO_Need', - ) , - 'end_time' => array( + 'localizable' => 0, + 'add' => '4.4', + ], + 'end_time' => [ 'name' => 'end_time', 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, - 'title' => ts('End Date and Time', array('domain' => 'org.civicrm.volunteer')) , - 'description' => 'Used for specifying fuzzy dates, e.g., I have a need for 3 hours of volunteer work to be completed between 12/01/2015 and 12/31/2015.', + 'title' => E::ts('End Date and Time'), + 'description' => E::ts('Used for specifying fuzzy dates, e.g., I have a need for 3 hours of volunteer work to be completed between 12/01/2015 and 12/31/2015.'), + 'where' => 'civicrm_volunteer_need.end_time', 'table_name' => 'civicrm_volunteer_need', 'entity' => 'Need', 'bao' => 'CRM_Volunteer_DAO_Need', - ) , - 'duration' => array( + 'localizable' => 0, + 'add' => '4.4', + ], + 'duration' => [ 'name' => 'duration', 'type' => CRM_Utils_Type::T_INT, - 'title' => ts('Duration', array('domain' => 'org.civicrm.volunteer')) , - 'description' => 'Length in minutes of this volunteer time slot.', + 'title' => E::ts('Duration'), + 'description' => E::ts('Length in minutes of this volunteer time slot.'), + 'where' => 'civicrm_volunteer_need.duration', 'table_name' => 'civicrm_volunteer_need', 'entity' => 'Need', 'bao' => 'CRM_Volunteer_DAO_Need', - ) , - 'is_flexible' => array( + 'localizable' => 0, + 'add' => '4.4', + ], + 'is_flexible' => [ 'name' => 'is_flexible', 'type' => CRM_Utils_Type::T_BOOLEAN, - 'title' => ts('Flexible', array('domain' => 'org.civicrm.volunteer')) , - 'description' => 'Boolean indicating whether or not the time and role are flexible. Activities linked to a flexible need indicate that the volunteer is generally available.', - 'required' => true, + 'title' => E::ts('Flexible'), + 'description' => E::ts('Boolean indicating whether or not the time and role are flexible. Activities linked to a flexible need indicate that the volunteer is generally available.'), + 'required' => TRUE, + 'where' => 'civicrm_volunteer_need.is_flexible', + 'default' => '0', 'table_name' => 'civicrm_volunteer_need', 'entity' => 'Need', 'bao' => 'CRM_Volunteer_DAO_Need', - ) , - 'quantity' => array( + 'localizable' => 0, + 'add' => '4.4', + ], + 'quantity' => [ 'name' => 'quantity', 'type' => CRM_Utils_Type::T_INT, - 'title' => ts('Quantity', array('domain' => 'org.civicrm.volunteer')) , - 'description' => 'The number of volunteers needed for this need.', + 'title' => E::ts('Quantity'), + 'description' => E::ts('The number of volunteers needed for this need.'), + 'where' => 'civicrm_volunteer_need.quantity', 'default' => 'NULL', 'table_name' => 'civicrm_volunteer_need', 'entity' => 'Need', 'bao' => 'CRM_Volunteer_DAO_Need', - ) , - 'visibility_id' => array( + 'localizable' => 0, + 'add' => '4.4', + ], + 'visibility_id' => [ 'name' => 'visibility_id', 'type' => CRM_Utils_Type::T_INT, - 'title' => ts('Visibility', array('domain' => 'org.civicrm.volunteer')) , - 'description' => ' Indicates whether this need is offered on public volunteer signup forms. Implicit FK to option_value row in visibility option_group.', + 'title' => E::ts('Visibility'), + 'description' => E::ts(' Indicates whether this need is offered on public volunteer signup forms. Implicit FK to option_value row in visibility option_group.'), + 'where' => 'civicrm_volunteer_need.visibility_id', 'default' => 'NULL', 'table_name' => 'civicrm_volunteer_need', 'entity' => 'Need', 'bao' => 'CRM_Volunteer_DAO_Need', - 'pseudoconstant' => array( + 'localizable' => 0, + 'pseudoconstant' => [ 'optionGroupName' => 'visibility', 'optionEditPath' => 'civicrm/admin/options/visibility', - ) - ) , - 'role_id' => array( + ], + 'add' => '4.4', + ], + 'role_id' => [ 'name' => 'role_id', 'type' => CRM_Utils_Type::T_INT, - 'title' => ts('Role', array('domain' => 'org.civicrm.volunteer')) , - 'description' => 'The role associated with this need. Implicit FK to option_value row in volunteer_role option_group.', + 'title' => E::ts('Role'), + 'description' => E::ts('The role associated with this need. Implicit FK to option_value row in volunteer_role option_group.'), + 'where' => 'civicrm_volunteer_need.role_id', 'default' => 'NULL', 'table_name' => 'civicrm_volunteer_need', 'entity' => 'Need', 'bao' => 'CRM_Volunteer_DAO_Need', - 'pseudoconstant' => array( + 'localizable' => 0, + 'pseudoconstant' => [ 'optionGroupName' => 'volunteer_role', 'optionEditPath' => 'civicrm/admin/options/volunteer_role', - ) - ) , - 'is_active' => array( + ], + 'add' => '4.4', + ], + 'is_active' => [ 'name' => 'is_active', 'type' => CRM_Utils_Type::T_BOOLEAN, - 'title' => ts('Enabled', array('domain' => 'org.civicrm.volunteer')) , - 'description' => 'Is this need enabled?', - 'required' => true, + 'title' => E::ts('Enabled'), + 'description' => E::ts('Is this need enabled?'), + 'required' => TRUE, + 'where' => 'civicrm_volunteer_need.is_active', 'default' => '1', 'table_name' => 'civicrm_volunteer_need', 'entity' => 'Need', 'bao' => 'CRM_Volunteer_DAO_Need', - ) , - 'created' => array( + 'localizable' => 0, + 'add' => '4.4', + ], + 'created' => [ 'name' => 'created', 'type' => CRM_Utils_Type::T_TIMESTAMP, - 'title' => ts('Date of Creation', array('domain' => 'org.civicrm.volunteer')) , - 'default' => 'NULL', + 'title' => E::ts('Date of Creation'), + 'where' => 'civicrm_volunteer_need.created', + 'default' => 'CURRENT_TIMESTAMP', 'table_name' => 'civicrm_volunteer_need', 'entity' => 'Need', 'bao' => 'CRM_Volunteer_DAO_Need', - ) , - 'last_updated' => array( + 'localizable' => 0, + 'add' => NULL, + ], + 'last_updated' => [ 'name' => 'last_updated', 'type' => CRM_Utils_Type::T_TIMESTAMP, - 'title' => ts('Date of Last Update', array('domain' => 'org.civicrm.volunteer')) , + 'title' => E::ts('Date of Last Update'), + 'where' => 'civicrm_volunteer_need.last_updated', 'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP', 'table_name' => 'civicrm_volunteer_need', 'entity' => 'Need', 'bao' => 'CRM_Volunteer_DAO_Need', - ) , - ); + 'localizable' => 0, + 'add' => NULL, + ], + ]; CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']); } return Civi::$statics[__CLASS__]['fields']; } + /** * Return a mapping from field-name to the corresponding key (as used in fields()). * * @return array * Array(string $name => string $uniqueName). */ - static function &fieldKeys() { + public static function &fieldKeys() { if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) { Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields())); } return Civi::$statics[__CLASS__]['fieldKeys']; } + /** * Returns the names of this table * * @return string */ - static function getTableName() { + public static function getTableName() { return self::$_tableName; } + /** * Returns if this table needs to be logged * - * @return boolean + * @return bool */ - function getLog() { + public function getLog() { return self::$_log; } + /** * Returns the list of fields that can be imported * @@ -311,10 +354,11 @@ function getLog() { * * @return array */ - static function &import($prefix = false) { - $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'volunteer_need', $prefix, array()); + public static function &import($prefix = FALSE) { + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'volunteer_need', $prefix, []); return $r; } + /** * Returns the list of fields that can be exported * @@ -322,8 +366,21 @@ static function &import($prefix = false) { * * @return array */ - static function &export($prefix = false) { - $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'volunteer_need', $prefix, array()); + public static function &export($prefix = FALSE) { + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'volunteer_need', $prefix, []); return $r; } + + /** + * Returns the list of indices + * + * @param bool $localize + * + * @return array + */ + public static function indices($localize = TRUE) { + $indices = []; + return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices; + } + } diff --git a/CRM/Volunteer/DAO/Project.php b/CRM/Volunteer/DAO/Project.php index c4dc8cfa..cd3619a8 100644 --- a/CRM/Volunteer/DAO/Project.php +++ b/CRM/Volunteer/DAO/Project.php @@ -1,256 +1,285 @@ __table = 'civicrm_volunteer_project'; parent::__construct(); } + + /** + * Returns localized title of this entity. + * + * @param bool $plural + * Whether to return the plural version of the title. + */ + public static function getEntityTitle($plural = FALSE) { + return $plural ? E::ts('Volunteer Projects') : E::ts('Volunteer Project'); + } + /** * Returns foreign keys and entity references. * * @return array * [CRM_Core_Reference_Interface] */ - static function getReferenceColumns() { + public static function getReferenceColumns() { if (!isset(Civi::$statics[__CLASS__]['links'])) { - Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__); - Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'loc_block_id', 'civicrm_loc_block', 'id'); - Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'campaign_id', 'civicrm_campaign', 'id'); + Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__); + Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'loc_block_id', 'civicrm_loc_block', 'id'); + Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'campaign_id', 'civicrm_campaign', 'id'); CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']); } return Civi::$statics[__CLASS__]['links']; } + /** * Returns all the column names of this table * * @return array */ - static function &fields() { + public static function &fields() { if (!isset(Civi::$statics[__CLASS__]['fields'])) { - Civi::$statics[__CLASS__]['fields'] = array( - 'id' => array( + Civi::$statics[__CLASS__]['fields'] = [ + 'id' => [ 'name' => 'id', 'type' => CRM_Utils_Type::T_INT, - 'title' => ts('CiviVolunteer Project ID', array('domain' => 'org.civicrm.volunteer')) , - 'description' => 'Project Id', - 'required' => true, + 'title' => E::ts('CiviVolunteer Project ID'), + 'description' => E::ts('Project Id'), + 'required' => TRUE, + 'where' => 'civicrm_volunteer_project.id', 'table_name' => 'civicrm_volunteer_project', 'entity' => 'Project', 'bao' => 'CRM_Volunteer_DAO_Project', - ) , - 'title' => array( + 'localizable' => 0, + 'add' => '4.4', + ], + 'title' => [ 'name' => 'title', 'type' => CRM_Utils_Type::T_STRING, - 'title' => ts('Title', array('domain' => 'org.civicrm.volunteer')) , - 'description' => 'The title of the Volunteer Project', - 'required' => true, + 'title' => E::ts('Title'), + 'description' => E::ts('The title of the Volunteer Project'), + 'required' => TRUE, 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, + 'where' => 'civicrm_volunteer_project.title', 'table_name' => 'civicrm_volunteer_project', 'entity' => 'Project', 'bao' => 'CRM_Volunteer_DAO_Project', - ) , - 'description' => array( + 'localizable' => 0, + 'add' => '4.5', + ], + 'description' => [ 'name' => 'description', 'type' => CRM_Utils_Type::T_TEXT, - 'title' => ts('Description', array('domain' => 'org.civicrm.volunteer')) , - 'description' => 'Full description of the Volunteer Project. Text and HTML allowed. Displayed on sign-up screens.', - 'required' => false, + 'title' => E::ts('Description'), + 'description' => E::ts('Full description of the Volunteer Project. Text and HTML allowed. Displayed on sign-up screens.'), + 'required' => FALSE, 'rows' => 8, 'cols' => 60, + 'where' => 'civicrm_volunteer_project.description', 'table_name' => 'civicrm_volunteer_project', 'entity' => 'Project', 'bao' => 'CRM_Volunteer_DAO_Project', - 'html' => array( + 'localizable' => 0, + 'html' => [ 'type' => 'RichTextEditor', - ) , - ) , - 'entity_table' => array( + ], + 'add' => '4.5', + ], + 'entity_table' => [ 'name' => 'entity_table', 'type' => CRM_Utils_Type::T_STRING, - 'title' => ts('Entity Table', array('domain' => 'org.civicrm.volunteer')) , - 'description' => 'Entity table for entity_id (initially civicrm_event)', - 'required' => true, + 'title' => E::ts('Entity Table'), + 'description' => E::ts('Entity table for entity_id (initially civicrm_event)'), + 'required' => TRUE, 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG, + 'where' => 'civicrm_volunteer_project.entity_table', 'table_name' => 'civicrm_volunteer_project', 'entity' => 'Project', 'bao' => 'CRM_Volunteer_DAO_Project', - ) , - 'entity_id' => array( + 'localizable' => 0, + 'add' => '4.4', + ], + 'entity_id' => [ 'name' => 'entity_id', 'type' => CRM_Utils_Type::T_INT, - 'description' => 'Implicit FK project entity (initially eventID).', - 'required' => true, + 'description' => E::ts('Implicit FK project entity (initially eventID).'), + 'required' => TRUE, + 'where' => 'civicrm_volunteer_project.entity_id', 'table_name' => 'civicrm_volunteer_project', 'entity' => 'Project', 'bao' => 'CRM_Volunteer_DAO_Project', - ) , - 'is_active' => array( + 'localizable' => 0, + 'add' => '4.4', + ], + 'is_active' => [ 'name' => 'is_active', 'type' => CRM_Utils_Type::T_BOOLEAN, - 'title' => ts('Enabled', array('domain' => 'org.civicrm.volunteer')) , - 'description' => 'Is this need enabled?', - 'required' => true, + 'title' => E::ts('Enabled'), + 'description' => E::ts('Is this need enabled?'), + 'required' => TRUE, + 'where' => 'civicrm_volunteer_project.is_active', 'default' => '1', 'table_name' => 'civicrm_volunteer_project', 'entity' => 'Project', 'bao' => 'CRM_Volunteer_DAO_Project', - ) , - 'loc_block_id' => array( + 'localizable' => 0, + 'add' => '4.4', + ], + 'loc_block_id' => [ 'name' => 'loc_block_id', 'type' => CRM_Utils_Type::T_INT, - 'title' => ts('Location Block ID') , - 'description' => 'FK to Location Block ID', + 'title' => E::ts('Location Block ID'), + 'description' => E::ts('FK to Location Block ID'), + 'where' => 'civicrm_volunteer_project.loc_block_id', 'table_name' => 'civicrm_volunteer_project', 'entity' => 'Project', 'bao' => 'CRM_Volunteer_DAO_Project', + 'localizable' => 0, 'FKClassName' => 'CRM_Core_DAO_LocBlock', - ) , - 'campaign_id' => array( + 'add' => '4.5', + ], + 'campaign_id' => [ 'name' => 'campaign_id', 'type' => CRM_Utils_Type::T_INT, - 'title' => ts('Campaign', array('domain' => 'org.civicrm.volunteer')) , - 'description' => 'The campaign associated with this Volunteer Project.', - 'required' => false, + 'title' => E::ts('Campaign'), + 'description' => E::ts('The campaign associated with this Volunteer Project.'), + 'required' => FALSE, + 'where' => 'civicrm_volunteer_project.campaign_id', 'table_name' => 'civicrm_volunteer_project', 'entity' => 'Project', 'bao' => 'CRM_Volunteer_DAO_Project', + 'localizable' => 0, 'FKClassName' => 'CRM_Campaign_DAO_Campaign', - ) , - ); + 'add' => '4.5', + ], + ]; CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']); } return Civi::$statics[__CLASS__]['fields']; } + /** * Return a mapping from field-name to the corresponding key (as used in fields()). * * @return array * Array(string $name => string $uniqueName). */ - static function &fieldKeys() { + public static function &fieldKeys() { if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) { Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields())); } return Civi::$statics[__CLASS__]['fieldKeys']; } + /** * Returns the names of this table * * @return string */ - static function getTableName() { + public static function getTableName() { return self::$_tableName; } + /** * Returns if this table needs to be logged * - * @return boolean + * @return bool */ - function getLog() { + public function getLog() { return self::$_log; } + /** * Returns the list of fields that can be imported * @@ -258,10 +287,11 @@ function getLog() { * * @return array */ - static function &import($prefix = false) { - $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'volunteer_project', $prefix, array()); + public static function &import($prefix = FALSE) { + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'volunteer_project', $prefix, []); return $r; } + /** * Returns the list of fields that can be exported * @@ -269,8 +299,21 @@ static function &import($prefix = false) { * * @return array */ - static function &export($prefix = false) { - $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'volunteer_project', $prefix, array()); + public static function &export($prefix = FALSE) { + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'volunteer_project', $prefix, []); return $r; } + + /** + * Returns the list of indices + * + * @param bool $localize + * + * @return array + */ + public static function indices($localize = TRUE) { + $indices = []; + return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices; + } + } diff --git a/CRM/Volunteer/DAO/ProjectContact.php b/CRM/Volunteer/DAO/ProjectContact.php index 56076fc2..412ceab6 100644 --- a/CRM/Volunteer/DAO/ProjectContact.php +++ b/CRM/Volunteer/DAO/ProjectContact.php @@ -1,186 +1,198 @@ __table = 'civicrm_volunteer_project_contact'; parent::__construct(); } + + /** + * Returns localized title of this entity. + * + * @param bool $plural + * Whether to return the plural version of the title. + */ + public static function getEntityTitle($plural = FALSE) { + return $plural ? E::ts('Volunteer Project Contacts') : E::ts('Volunteer Project Contact'); + } + /** * Returns foreign keys and entity references. * * @return array * [CRM_Core_Reference_Interface] */ - static function getReferenceColumns() { + public static function getReferenceColumns() { if (!isset(Civi::$statics[__CLASS__]['links'])) { - Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__); - Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'project_id', 'civicrm_volunteer_project', 'id'); - Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id'); + Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__); + Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'project_id', 'civicrm_volunteer_project', 'id'); + Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'contact_id', 'civicrm_contact', 'id'); CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']); } return Civi::$statics[__CLASS__]['links']; } + /** * Returns all the column names of this table * * @return array */ - static function &fields() { + public static function &fields() { if (!isset(Civi::$statics[__CLASS__]['fields'])) { - Civi::$statics[__CLASS__]['fields'] = array( - 'id' => array( + Civi::$statics[__CLASS__]['fields'] = [ + 'id' => [ 'name' => 'id', 'type' => CRM_Utils_Type::T_INT, - 'title' => ts('CiviVolunteer ProjectContact Row ID', array('domain' => 'org.civicrm.volunteer')) , - 'required' => true, + 'title' => E::ts('CiviVolunteer ProjectContact Row ID'), + 'required' => TRUE, + 'where' => 'civicrm_volunteer_project_contact.id', 'table_name' => 'civicrm_volunteer_project_contact', 'entity' => 'ProjectContact', 'bao' => 'CRM_Volunteer_DAO_ProjectContact', - ) , - 'project_id' => array( + 'localizable' => 0, + 'add' => '4.5', + ], + 'project_id' => [ 'name' => 'project_id', 'type' => CRM_Utils_Type::T_INT, - 'title' => ts('CiviVolunteer Project ID', array('domain' => 'org.civicrm.volunteer')) , - 'description' => 'Foreign key to the Volunteer Project for this record', - 'required' => true, + 'title' => E::ts('CiviVolunteer Project ID'), + 'description' => E::ts('Foreign key to the Volunteer Project for this record'), + 'required' => TRUE, + 'where' => 'civicrm_volunteer_project_contact.project_id', 'table_name' => 'civicrm_volunteer_project_contact', 'entity' => 'ProjectContact', 'bao' => 'CRM_Volunteer_DAO_ProjectContact', + 'localizable' => 0, 'FKClassName' => 'CRM_Volunteer_DAO_Project', - ) , - 'contact_id' => array( + 'add' => '4.5', + ], + 'contact_id' => [ 'name' => 'contact_id', 'type' => CRM_Utils_Type::T_INT, - 'title' => ts('Contact ID', array('domain' => 'org.civicrm.volunteer')) , - 'description' => 'Foreign key to the Contact for this record', - 'required' => true, + 'title' => E::ts('Contact ID'), + 'description' => E::ts('Foreign key to the Contact for this record'), + 'required' => TRUE, + 'where' => 'civicrm_volunteer_project_contact.contact_id', 'table_name' => 'civicrm_volunteer_project_contact', 'entity' => 'ProjectContact', 'bao' => 'CRM_Volunteer_DAO_ProjectContact', + 'localizable' => 0, 'FKClassName' => 'CRM_Contact_DAO_Contact', - ) , - 'relationship_type_id' => array( + 'add' => '4.5', + ], + 'relationship_type_id' => [ 'name' => 'relationship_type_id', 'type' => CRM_Utils_Type::T_INT, - 'title' => ts('Relationship Type', array('domain' => 'org.civicrm.volunteer')) , - 'description' => 'Nature of the contact\'s relationship to the Volunteer Project (e.g., Beneficiary). See option group volunteer_project_relationship.', - 'required' => true, + 'title' => E::ts('Relationship Type'), + 'description' => E::ts('Nature of the contact\'s relationship to the Volunteer Project (e.g., Beneficiary). See option group volunteer_project_relationship.'), + 'required' => TRUE, + 'where' => 'civicrm_volunteer_project_contact.relationship_type_id', 'table_name' => 'civicrm_volunteer_project_contact', 'entity' => 'ProjectContact', 'bao' => 'CRM_Volunteer_DAO_ProjectContact', - 'pseudoconstant' => array( + 'localizable' => 0, + 'pseudoconstant' => [ 'optionGroupName' => 'volunteer_project_relationship', 'optionEditPath' => 'civicrm/admin/options/volunteer_project_relationship', - ) - ) , - ); + ], + 'add' => '4.5', + ], + ]; CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']); } return Civi::$statics[__CLASS__]['fields']; } + /** * Return a mapping from field-name to the corresponding key (as used in fields()). * * @return array * Array(string $name => string $uniqueName). */ - static function &fieldKeys() { + public static function &fieldKeys() { if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) { Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields())); } return Civi::$statics[__CLASS__]['fieldKeys']; } + /** * Returns the names of this table * * @return string */ - static function getTableName() { + public static function getTableName() { return self::$_tableName; } + /** * Returns if this table needs to be logged * - * @return boolean + * @return bool */ - function getLog() { + public function getLog() { return self::$_log; } + /** * Returns the list of fields that can be imported * @@ -188,10 +200,11 @@ function getLog() { * * @return array */ - static function &import($prefix = false) { - $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'volunteer_project_contact', $prefix, array()); + public static function &import($prefix = FALSE) { + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'volunteer_project_contact', $prefix, []); return $r; } + /** * Returns the list of fields that can be exported * @@ -199,8 +212,21 @@ static function &import($prefix = false) { * * @return array */ - static function &export($prefix = false) { - $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'volunteer_project_contact', $prefix, array()); + public static function &export($prefix = FALSE) { + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'volunteer_project_contact', $prefix, []); return $r; } + + /** + * Returns the list of indices + * + * @param bool $localize + * + * @return array + */ + public static function indices($localize = TRUE) { + $indices = []; + return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices; + } + } diff --git a/CRM/Volunteer/Upgrader.php b/CRM/Volunteer/Upgrader.php index fbb6508c..26efefd2 100644 --- a/CRM/Volunteer/Upgrader.php +++ b/CRM/Volunteer/Upgrader.php @@ -55,12 +55,8 @@ public function install() { $this->installCommendationActivityType(); - $this->schemaUpgrade20(); - $this->addNeedEndDate(); $this->installVolMsgWorkflowTpls(); - $this->installNeedMetaDateFields(); - // uncomment the next line to insert sample data // $this->executeSqlFile('sql/volunteer_sample.mysql'); } @@ -438,6 +434,15 @@ public function upgrade_2300() { return $this->installNeedMetaDateFields(); } + /** + * Add default value to volunteer_need.created column + */ + public function upgrade_2301() { + $this->ctx->log->info('Applying update 2301 - Add default value to volunteer_need.created column'); + CRM_Core_DAO::executeQuery('ALTER TABLE `civicrm_volunteer_need` CHANGE COLUMN `created` `created` timestamp DEFAULT CURRENT_TIMESTAMP'); + return TRUE; + } + public function uninstall() { civicrm_api3('CustomGroup', 'get', array( 'name' => array('IN' => array('CiviVolunteer', 'Volunteer_Information', 'volunteer_commendation')), diff --git a/bin/setup.conf.txt b/bin/setup.conf.txt deleted file mode 100644 index 23a31ee2..00000000 --- a/bin/setup.conf.txt +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# Define the path for civicrm source directory here -CIVIROOT= - -## Define the path for civivolunteer source directory here -VOLROOT= - -# set your PHP5 bin dir path here, if it's not in PATH -# The path should be terminated with dir separator! -PHP5PATH= - -# GenCode produces localized data files for all known -# locales. This is good for stable-releases but -# cumbersome during development. To speed it up, -# list the desired locales. -# export CIVICRM_LOCALES=en_US,fr_FR diff --git a/bin/setup.sh b/bin/setup.sh deleted file mode 100755 index 742b9d9e..00000000 --- a/bin/setup.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash - -CALLEDPATH=`dirname $0` - -# Convert to an absolute path if necessary -case "$CALLEDPATH" in - .*) - CALLEDPATH="$PWD/$CALLEDPATH" - ;; -esac - -if [ ! -f "$CALLEDPATH/setup.conf" ]; then - echo - echo "Missing configuration file. Please copy $CALLEDPATH/setup.conf.txt to $CALLEDPATH/setup.conf and edit it." - exit 1 -fi - -source "$CALLEDPATH/setup.conf" - -cp $CIVIROOT/xml/schema/Schema.xml $CIVIROOT/xml/schema/Schema.xml.backup - -# append Volunteer schema to core schema -sed -i 's###' "$CIVIROOT/xml/schema/Schema.xml" -grep "> "$CIVIROOT/xml/schema/Schema.xml" -echo "" >> "$CIVIROOT/xml/schema/Schema.xml" - -if [ ! -e "$CIVIROOT/xml/schema/Volunteer" ] ; then - ln -s $VOLROOT/xml/schema/Volunteer $CIVIROOT/xml/schema/Volunteer -fi -cd $CIVIROOT/xml -php GenCode.php -# (There may be extra arguments to pass into GenCode.php; not sure) - -cp -f $CIVIROOT/CRM/Volunteer/DAO/* $VOLROOT/CRM/Volunteer/DAO/ -mv $CIVIROOT/xml/schema/Schema.xml.backup $CIVIROOT/xml/schema/Schema.xml - -unlink $CIVIROOT/xml/schema/Volunteer -rm -rf $CIVIROOT/CRM/Volunteer diff --git a/info.xml b/info.xml index 8f6f6db3..f6922b96 100644 --- a/info.xml +++ b/info.xml @@ -11,8 +11,7 @@ 2018-06-29 2.4.0 - 4.7 - 5.0 + 5.28 Developed by Ginkgo Street Labs and CiviCRM, LLC with contributions from the community. Special thanks to Friends of Georgia State Parks & Historic Sites for funding the initial release, and to The Manhattan Neighborhood Network for funding the 1.4 release. diff --git a/sql/auto_install.sql b/sql/auto_install.sql new file mode 100644 index 00000000..2b92ab46 --- /dev/null +++ b/sql/auto_install.sql @@ -0,0 +1,113 @@ +-- +--------------------------------------------------------------------+ +-- | Copyright CiviCRM LLC. All rights reserved. | +-- | | +-- | This work is published under the GNU AGPLv3 license with some | +-- | permitted exceptions and without any warranty. For full license | +-- | and copyright information, see https://civicrm.org/licensing | +-- +--------------------------------------------------------------------+ +-- +-- Generated from schema.tpl +-- DO NOT EDIT. Generated by CRM_Core_CodeGen +-- + + +-- +--------------------------------------------------------------------+ +-- | Copyright CiviCRM LLC. All rights reserved. | +-- | | +-- | This work is published under the GNU AGPLv3 license with some | +-- | permitted exceptions and without any warranty. For full license | +-- | and copyright information, see https://civicrm.org/licensing | +-- +--------------------------------------------------------------------+ +-- +-- Generated from drop.tpl +-- DO NOT EDIT. Generated by CRM_Core_CodeGen +-- +-- /******************************************************* +-- * +-- * Clean up the exisiting tables +-- * +-- *******************************************************/ + +SET FOREIGN_KEY_CHECKS=0; + +DROP TABLE IF EXISTS `civicrm_volunteer_need`; +DROP TABLE IF EXISTS `civicrm_volunteer_project_contact`; +DROP TABLE IF EXISTS `civicrm_volunteer_project`; + +SET FOREIGN_KEY_CHECKS=1; +-- /******************************************************* +-- * +-- * Create new tables +-- * +-- *******************************************************/ + +-- /******************************************************* +-- * +-- * civicrm_volunteer_project +-- * +-- *******************************************************/ +CREATE TABLE `civicrm_volunteer_project` ( + + + `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Project Id', + `title` varchar(255) NOT NULL COMMENT 'The title of the Volunteer Project', + `description` text NULL COMMENT 'Full description of the Volunteer Project. Text and HTML allowed. Displayed on sign-up screens.', + `entity_table` varchar(64) NOT NULL COMMENT 'Entity table for entity_id (initially civicrm_event)', + `entity_id` int unsigned NOT NULL COMMENT 'Implicit FK project entity (initially eventID).', + `is_active` tinyint NOT NULL DEFAULT 1 COMMENT 'Is this need enabled?', + `loc_block_id` int unsigned COMMENT 'FK to Location Block ID', + `campaign_id` int unsigned NULL COMMENT 'The campaign associated with this Volunteer Project.' +, + PRIMARY KEY (`id`) + + +, CONSTRAINT FK_civicrm_volunteer_project_loc_block_id FOREIGN KEY (`loc_block_id`) REFERENCES `civicrm_loc_block`(`id`) ON DELETE SET NULL, CONSTRAINT FK_civicrm_volunteer_project_campaign_id FOREIGN KEY (`campaign_id`) REFERENCES `civicrm_campaign`(`id`) ON DELETE SET NULL +) ; + +-- /******************************************************* +-- * +-- * civicrm_volunteer_project_contact +-- * +-- *******************************************************/ +CREATE TABLE `civicrm_volunteer_project_contact` ( + + + `id` int unsigned NOT NULL AUTO_INCREMENT , + `project_id` int unsigned NOT NULL COMMENT 'Foreign key to the Volunteer Project for this record', + `contact_id` int unsigned NOT NULL COMMENT 'Foreign key to the Contact for this record', + `relationship_type_id` int unsigned NOT NULL COMMENT 'Nature of the contact\'s relationship to the Volunteer Project (e.g., Beneficiary). See option group volunteer_project_relationship.' +, + PRIMARY KEY (`id`) + + +, CONSTRAINT FK_civicrm_volunteer_project_contact_project_id FOREIGN KEY (`project_id`) REFERENCES `civicrm_volunteer_project`(`id`) ON DELETE CASCADE, CONSTRAINT FK_civicrm_volunteer_project_contact_contact_id FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact`(`id`) ON DELETE CASCADE +) ; + +-- /******************************************************* +-- * +-- * civicrm_volunteer_need +-- * +-- *******************************************************/ +CREATE TABLE `civicrm_volunteer_need` ( + + + `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Need Id', + `project_id` int unsigned NULL COMMENT 'FK to civicrm_volunteer_project table which contains entity_table + entity for each volunteer project (initially civicrm_event + eventID).', + `start_time` datetime , + `end_time` datetime COMMENT 'Used for specifying fuzzy dates, e.g., I have a need for 3 hours of volunteer work to be completed between 12/01/2015 and 12/31/2015.', + `duration` int COMMENT 'Length in minutes of this volunteer time slot.', + `is_flexible` tinyint NOT NULL DEFAULT 0 COMMENT 'Boolean indicating whether or not the time and role are flexible. Activities linked to a flexible need indicate that the volunteer is generally available.', + `quantity` int DEFAULT NULL COMMENT 'The number of volunteers needed for this need.', + `visibility_id` int unsigned DEFAULT NULL COMMENT ' Indicates whether this need is offered on public volunteer signup forms. Implicit FK to option_value row in visibility option_group.', + `role_id` int unsigned DEFAULT NULL COMMENT 'The role associated with this need. Implicit FK to option_value row in volunteer_role option_group.', + `is_active` tinyint NOT NULL DEFAULT 1 COMMENT 'Is this need enabled?', + `created` timestamp DEFAULT CURRENT_TIMESTAMP , + `last_updated` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +, + PRIMARY KEY (`id`) + + +, CONSTRAINT FK_civicrm_volunteer_need_project_id FOREIGN KEY (`project_id`) REFERENCES `civicrm_volunteer_project`(`id`) ON DELETE SET NULL +) ; + + \ No newline at end of file diff --git a/sql/auto_uninstall.sql b/sql/auto_uninstall.sql new file mode 100644 index 00000000..e33bab00 --- /dev/null +++ b/sql/auto_uninstall.sql @@ -0,0 +1,24 @@ +-- +--------------------------------------------------------------------+ +-- | Copyright CiviCRM LLC. All rights reserved. | +-- | | +-- | This work is published under the GNU AGPLv3 license with some | +-- | permitted exceptions and without any warranty. For full license | +-- | and copyright information, see https://civicrm.org/licensing | +-- +--------------------------------------------------------------------+ +-- +-- Generated from drop.tpl +-- DO NOT EDIT. Generated by CRM_Core_CodeGen +-- +-- /******************************************************* +-- * +-- * Clean up the exisiting tables +-- * +-- *******************************************************/ + +SET FOREIGN_KEY_CHECKS=0; + +DROP TABLE IF EXISTS `civicrm_volunteer_need`; +DROP TABLE IF EXISTS `civicrm_volunteer_project_contact`; +DROP TABLE IF EXISTS `civicrm_volunteer_project`; + +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file diff --git a/sql/volunteer_install.sql b/sql/volunteer_install.sql deleted file mode 100644 index f726ef01..00000000 --- a/sql/volunteer_install.sql +++ /dev/null @@ -1,26 +0,0 @@ -CREATE TABLE IF NOT EXISTS civicrm_volunteer_project ( - id int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Project Id', - entity_table varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Entity table for entity_id (initially civicrm_event)', - entity_id int(10) unsigned NOT NULL COMMENT 'Implicit FK project entity (initially eventID).', - target_contact_id int(10) unsigned NULL COMMENT 'FK to civicrm_contact. The target (or beneficiary) of the volunteer activity', - is_active tinyint(4) NOT NULL DEFAULT '1' COMMENT 'Is the project active. Enabling volunteering for an event or other project sets this TRUE.', - PRIMARY KEY (`id`), - UNIQUE KEY `unique_entity` (`entity_table`,`entity_id`), - CONSTRAINT FK_civicrm_volunteer_project_target_contact_id FOREIGN KEY (`target_contact_id`) REFERENCES `civicrm_contact`(`id`) ON DELETE SET NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; - -CREATE TABLE IF NOT EXISTS civicrm_volunteer_need ( - id int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Need Id', - project_id int(10) unsigned COMMENT 'FK to civicrm_volunteer_project table which contains entity_table + entity for each volunteer project (initially civicrm_event + eventID).', - start_time datetime DEFAULT NULL, - duration int(11) DEFAULT NULL COMMENT 'Length in minutes of this volunteer time slot.', - is_flexible tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Boolean indicating whether or not the time and role are flexible. Activities linked to a flexible need indicate that the volunteer is generally available.', - quantity int(11) DEFAULT NULL COMMENT 'Number of volunteers required for this need.', - visibility_id int(11) unsigned DEFAULT NULL COMMENT 'Implicit FK to option_value row in visibility option_group. Indicates whether this need is offered on public volunteer signup forms.', - role_id int(11) DEFAULT NULL COMMENT 'Implicit FK to option_value row in volunteer_role option_group.', - is_active tinyint(4) NOT NULL DEFAULT '1' COMMENT 'Is this need enabled?', - PRIMARY KEY (`id`), - UNIQUE KEY `UI_id` (`id`), - KEY `FK_civicrm_volunteer_need_project_id` (`project_id`), - CONSTRAINT `FK_civicrm_volunteer_need_project_id` FOREIGN KEY (`project_id`) REFERENCES `civicrm_volunteer_project`(`id`) ON DELETE SET NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; \ No newline at end of file diff --git a/sql/volunteer_uninstall.sql b/sql/volunteer_uninstall.sql index 2c4ba296..226cf631 100644 --- a/sql/volunteer_uninstall.sql +++ b/sql/volunteer_uninstall.sql @@ -1,8 +1,3 @@ -/* drop custom tables */ -DROP TABLE IF EXISTS `civicrm_volunteer_need`; -DROP TABLE IF EXISTS `civicrm_volunteer_project_contact`; -DROP TABLE IF EXISTS `civicrm_volunteer_project`; - /* drop report-related records */ DELETE FROM `civicrm_report_instance` WHERE report_id = 'volunteer'; @@ -14,4 +9,4 @@ DELETE FROM `civicrm_custom_group` WHERE `name` = 'CiviVolunteer'; /* drop volunteer sign-up profile (FK takes care of profile fields) */ DELETE FROM `civicrm_uf_join` WHERE `module` = 'CiviVolunteer'; -DELETE FROM `civicrm_uf_group` WHERE `name` = 'volunteer_sign_up'; \ No newline at end of file +DELETE FROM `civicrm_uf_group` WHERE `name` = 'volunteer_sign_up'; diff --git a/xml/schema/Volunteer/Need.xml b/xml/schema/CRM/Volunteer/Need.xml similarity index 97% rename from xml/schema/Volunteer/Need.xml rename to xml/schema/CRM/Volunteer/Need.xml index 0331b02b..9e6685a0 100644 --- a/xml/schema/Volunteer/Need.xml +++ b/xml/schema/CRM/Volunteer/Need.xml @@ -3,6 +3,7 @@ CRM/VolunteerNeed + Volunteer Needcivicrm_volunteer_need4.4true @@ -103,7 +104,7 @@ createdtimestampDate of Creation - NULL + CURRENT_TIMESTAMP last_updated diff --git a/xml/schema/Volunteer/Project.xml b/xml/schema/CRM/Volunteer/Project.xml similarity index 98% rename from xml/schema/Volunteer/Project.xml rename to xml/schema/CRM/Volunteer/Project.xml index cd7cd8b6..b2380f9b 100644 --- a/xml/schema/Volunteer/Project.xml +++ b/xml/schema/CRM/Volunteer/Project.xml @@ -3,6 +3,7 @@
CRM/VolunteerProject + Volunteer Projectcivicrm_volunteer_project4.4true diff --git a/xml/schema/Volunteer/ProjectContact.xml b/xml/schema/CRM/Volunteer/ProjectContact.xml similarity index 97% rename from xml/schema/Volunteer/ProjectContact.xml rename to xml/schema/CRM/Volunteer/ProjectContact.xml index f4602fa6..e3994ccf 100644 --- a/xml/schema/Volunteer/ProjectContact.xml +++ b/xml/schema/CRM/Volunteer/ProjectContact.xml @@ -3,6 +3,7 @@
CRM/VolunteerProjectContact + Volunteer Project Contactcivicrm_volunteer_project_contact4.5true diff --git a/xml/schema/Schema.xml b/xml/schema/Schema.xml deleted file mode 100644 index 23e22973..00000000 --- a/xml/schema/Schema.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - -civicrm -utf8 -utf8_unicode_ci -InnoDB -Schema for CiviCRM - - - diff --git a/xml/schema/Volunteer/files.xml b/xml/schema/Volunteer/files.xml deleted file mode 100644 index 48b4ff2a..00000000 --- a/xml/schema/Volunteer/files.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - -