From 175cd99261541e182937540c4e4ae6a7f7668a4b Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Wed, 2 Nov 2016 15:03:28 -0400 Subject: [PATCH] Updating db tables with new fields. Adding new field for event management. use_venue_locations - To use other member locations as event locations. Adding new field for event table. other_ref_dest - Another members id for location. --- classes/data/dataManagement.php | 24 ++++++++++++------- index.php | 2 +- ..._V0.1.0.sql => create_database_V0.1.1.sql} | 2 ++ setup/databaseScripts/dbVersions.php | 1 + .../update_database_V0.1.1.sql | 14 +++++++++++ views/admin/management/events.html | 6 +++++ 6 files changed, 39 insertions(+), 10 deletions(-) rename setup/databaseScripts/{create_database_V0.1.0.sql => create_database_V0.1.1.sql} (98%) create mode 100644 setup/databaseScripts/update_database_V0.1.1.sql diff --git a/classes/data/dataManagement.php b/classes/data/dataManagement.php index c352e6b..92a2f8b 100644 --- a/classes/data/dataManagement.php +++ b/classes/data/dataManagement.php @@ -129,7 +129,7 @@ class GlmDataEventsManagement extends GlmDataAbstract 'required' => true, 'use' => 'a' ), - + // Default State 'event_default_state' => array ( 'field' => 'event_default_state', @@ -139,7 +139,7 @@ class GlmDataEventsManagement extends GlmDataAbstract 'force_list' => true, 'use' => 'a' ), - + // Logo for Event PDF 'pdf_logo' => array( 'field' => 'pdf_logo', @@ -159,9 +159,9 @@ class GlmDataEventsManagement extends GlmDataAbstract 'field' => 'calendar_view', 'type' => 'text', 'require' => false, - 'use' => 'a' + 'use' => 'a' ), - // Recipient Email + // Recipient Email 'to_email' => array( 'field' => 'to_email', 'type' => 'text', @@ -187,20 +187,26 @@ class GlmDataEventsManagement extends GlmDataAbstract 'field' => 'term_event_amenities_singular', 'type' => 'text', 'require' => false, - 'use' => 'a' + 'use' => 'a' ), // calendar view 'term_event_amenities_plural' => array( 'field' => 'term_event_amenities_plural', 'type' => 'text', 'require' => false, - 'use' => 'a' + 'use' => 'a' ), 'use_event_amenities' => array ( - 'field' => 'use_event_amenities', - 'type' => 'checkbox', + 'field' => 'use_event_amenities', + 'type' => 'checkbox', 'default' => false, - 'use' => 'a' + 'use' => 'a' + ), + 'use_venue_locations' => array( + 'field' => 'use_venue_locations', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' ), ); diff --git a/index.php b/index.php index 700d452..949d66c 100644 --- a/index.php +++ b/index.php @@ -39,7 +39,7 @@ * version from this plugin. */ define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.5.2'); -define('GLM_MEMBERS_EVENTS_PLUGIN_DB_VERSION', '0.1.0'); +define('GLM_MEMBERS_EVENTS_PLUGIN_DB_VERSION', '0.1.1'); // This is the minimum version of the GLM Members DB plugin require for this plugin. define('GLM_MEMBERS_EVENTS_PLUGIN_MIN_MEMBERS_REQUIRED_VERSION', '1.0.58'); diff --git a/setup/databaseScripts/create_database_V0.1.0.sql b/setup/databaseScripts/create_database_V0.1.1.sql similarity index 98% rename from setup/databaseScripts/create_database_V0.1.0.sql rename to setup/databaseScripts/create_database_V0.1.1.sql index 0b5a33f..715a558 100644 --- a/setup/databaseScripts/create_database_V0.1.0.sql +++ b/setup/databaseScripts/create_database_V0.1.1.sql @@ -195,6 +195,7 @@ CREATE TABLE {prefix}events ( contact_name TINYTEXT NULL, -- Contact name contact_phone TINYTEXT NULL, -- Event Phone use_member_location BOOLEAN NULL, -- Use location of the member (if provided) rather than location table data + other_ref_dest INT NULL, -- Set location of the event to another member old_event_id INT NULL, -- ID of event from old site for reference ical_uid TINYTEXT NULL, -- The ical UID for this event. notes TEXT NULL, -- Internal notes for this event @@ -224,6 +225,7 @@ CREATE TABLE {prefix}management ( term_event_amenities_singular TINYTEXT NULL, -- Singular term to use for event amenities term_event_amenities_plural TINYTEXT NULL, -- Plural term to use for event amenities use_event_amenities BOOLEAN NULL, -- Whether amenities are used at all for events + use_venue_locations BOOLEAN NULL, -- To use Other members as the location of event PRIMARY KEY (id) ); diff --git a/setup/databaseScripts/dbVersions.php b/setup/databaseScripts/dbVersions.php index bf3b33f..9ee5c66 100644 --- a/setup/databaseScripts/dbVersions.php +++ b/setup/databaseScripts/dbVersions.php @@ -36,5 +36,6 @@ $glmMembersEventsDbVersions = array( '0.0.22' => array('version' => '0.0.22', 'tables' => 8, 'date' => '8/30/2016'), '0.0.23' => array('version' => '0.0.23', 'tables' => 12, 'date' => '10/20/2016'), '0.1.0' => array('version' => '0.1.0', 'tables' => 12, 'date' => '10/20/2016'), + '0.1.1' => array('version' => '0.1.1', 'tables' => 12, 'date' => '11/02/2016'), ); diff --git a/setup/databaseScripts/update_database_V0.1.1.sql b/setup/databaseScripts/update_database_V0.1.1.sql new file mode 100644 index 0000000..e6213dc --- /dev/null +++ b/setup/databaseScripts/update_database_V0.1.1.sql @@ -0,0 +1,14 @@ +-- Gaslight Media Members Database - Events Add-On +-- File Created: 08/30/16 09:47:15 +-- Database Version: 0.1.1 +-- 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 + +-- venue locations +ALTER TABLE {prefix}management ADD COLUMN use_venue_locations BOOLEAN NULL; -- To use Other members as the location of event + +---- + +ALTER TABLE {prefix}events ADD COLUMN other_ref_dest INTEGER NULL; -- Set location of the event to another member diff --git a/views/admin/management/events.html b/views/admin/management/events.html index 3b31944..09ad34e 100644 --- a/views/admin/management/events.html +++ b/views/admin/management/events.html @@ -112,6 +112,12 @@ + + Event Venue Locations. + + Activate Member/Venue Locations

+ + -- 2.17.1