From d630ace1b9f177a2640c6e61697a191e9317f27f Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Thu, 9 Aug 2018 10:28:47 -0400 Subject: [PATCH] Add new field for Company phone in Directory New field business_phone --- classes/data/dataContacts.php | 7 +++++++ index.php | 2 +- ...te_database_V0.0.6.sql => create_database_V0.0.7.sql} | 3 ++- setup/databaseScripts/dbVersions.php | 1 + setup/databaseScripts/update_database_V0.0.6.sql | 2 +- setup/databaseScripts/update_database_V0.0.7.sql | 9 +++++++++ 6 files changed, 21 insertions(+), 3 deletions(-) rename setup/databaseScripts/{create_database_V0.0.6.sql => create_database_V0.0.7.sql} (97%) create mode 100644 setup/databaseScripts/update_database_V0.0.7.sql diff --git a/classes/data/dataContacts.php b/classes/data/dataContacts.php index a9f320b..bc3ad87 100644 --- a/classes/data/dataContacts.php +++ b/classes/data/dataContacts.php @@ -522,6 +522,13 @@ class GlmDataContacts extends GlmDataAbstract 'use' => 'a' ), + // Office Phone + 'business_phone' => array( + 'field' => 'business_phone', + 'type' => 'phone', + 'use' => 'a' + ), + // E-Mail Address 'business_mobile' => array( 'field' => 'business_mobile', diff --git a/index.php b/index.php index 8d0a000..d76e28d 100644 --- a/index.php +++ b/index.php @@ -40,7 +40,7 @@ if (!defined('ABSPATH')) { * version nunmber of that release for the DB version. */ define('GLM_MEMBERS_CONTACTS_PLUGIN_VERSION', '1.1.10'); -define('GLM_MEMBERS_CONTACTS_PLUGIN_DB_VERSION', '0.0.6'); +define('GLM_MEMBERS_CONTACTS_PLUGIN_DB_VERSION', '0.0.7'); // This is the minimum version of the GLM Members DB plugin require for this plugin. define('GLM_MEMBERS_CONTACTS_PLUGIN_MIN_MEMBERS_REQUIRED_VERSION', '1.0.58'); diff --git a/setup/databaseScripts/create_database_V0.0.6.sql b/setup/databaseScripts/create_database_V0.0.7.sql similarity index 97% rename from setup/databaseScripts/create_database_V0.0.6.sql rename to setup/databaseScripts/create_database_V0.0.7.sql index 779e0d9..13b8205 100644 --- a/setup/databaseScripts/create_database_V0.0.6.sql +++ b/setup/databaseScripts/create_database_V0.0.7.sql @@ -1,6 +1,6 @@ -- Gaslight Media Members Database -- File Created: 12/09/14 15:27:15 --- Database Version: 0.0.6 +-- Database Version: 0.0.7 -- Database Creation Script - Contacts Add-On -- -- To permit each query below to be executed separately, @@ -54,6 +54,7 @@ CREATE TABLE {prefix}contacts ( business_zip TINYTEXT NULL, -- Org Zip business_country TINYTEXT NULL, -- Org Country business_email TINYTEXT NULL, -- Org Email + business_phone TINYTEXT NULL, -- Org Phone in Directory office_phone TINYTEXT NULL, -- Org Office phone number business_mobile TINYTEXT NULL, -- Org Mobile fax TINYTEXT NULL, -- Org FAX number (do people still use these?) diff --git a/setup/databaseScripts/dbVersions.php b/setup/databaseScripts/dbVersions.php index a52309e..0e35b6e 100644 --- a/setup/databaseScripts/dbVersions.php +++ b/setup/databaseScripts/dbVersions.php @@ -33,6 +33,7 @@ $glmMembersContactsDbVersions = array( '0.0.4' => array('version' => '0.0.4', 'tables' => 1, 'date' => '07/26/2018'), '0.0.5' => array('version' => '0.0.5', 'tables' => 1, 'date' => '07/26/2018'), '0.0.6' => array('version' => '0.0.6', 'tables' => 1, 'date' => '07/26/2018'), + '0.0.7' => array('version' => '0.0.7', 'tables' => 1, 'date' => '08/09/2018'), ); diff --git a/setup/databaseScripts/update_database_V0.0.6.sql b/setup/databaseScripts/update_database_V0.0.6.sql index c911c63..56916e0 100644 --- a/setup/databaseScripts/update_database_V0.0.6.sql +++ b/setup/databaseScripts/update_database_V0.0.6.sql @@ -4,7 +4,7 @@ -- Database Update From Previous Version Script -- -- To permit each query below to be executed separately, --- all queries must be separated by a line with four dashses +-- all queries must be separated by a line with four dashes ALTER TABLE {prefix}contacts ADD COLUMN mailing_address_type TINYTEXT NULL; -- Mailing Address Type diff --git a/setup/databaseScripts/update_database_V0.0.7.sql b/setup/databaseScripts/update_database_V0.0.7.sql new file mode 100644 index 0000000..0a45607 --- /dev/null +++ b/setup/databaseScripts/update_database_V0.0.7.sql @@ -0,0 +1,9 @@ +-- Gaslight Media Members Database - Contacts Add-On +-- File Created: 2018-08-09 +-- Database Version: 0.0.7 +-- Database Update From Previous Version Script +-- +-- To permit each query below to be executed separately, +-- all queries must be separated by a line with four dashes + +ALTER TABLE {prefix}contacts ADD COLUMN business_phone TINYTEXT NULL; -- Org Phone in Directory -- 2.17.1