From 2fc2c72ea565096727de6856d5cacb92a5d8d795 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 25 Jun 2018 14:15:43 -0400 Subject: [PATCH] Database updates Adding new table for the setting. Email notifications settings. --- index.php | 2 +- ...1.1.36.sql => create_database_V1.1.37.sql} | 21 +++++++++++++++ setup/databaseScripts/dbVersions.php | 1 + .../update_database_V1.1.37.sql | 26 +++++++++++++++++++ 4 files changed, 49 insertions(+), 1 deletion(-) rename setup/databaseScripts/{create_database_V1.1.36.sql => create_database_V1.1.37.sql} (97%) create mode 100644 setup/databaseScripts/update_database_V1.1.37.sql diff --git a/index.php b/index.php index b9372219..51e4db8b 100644 --- a/index.php +++ b/index.php @@ -47,7 +47,7 @@ if (!defined('ABSPATH')) { */ define('GLM_MEMBERS_PLUGIN_VERSION', '2.10.34'); -define('GLM_MEMBERS_PLUGIN_DB_VERSION', '1.1.36'); +define('GLM_MEMBERS_PLUGIN_DB_VERSION', '1.1.37'); // Check if plugin version is not current in WordPress option and if needed updated it if (GLM_MEMBERS_PLUGIN_VERSION != get_option('glmMembersDatabasePluginVersion')) { diff --git a/setup/databaseScripts/create_database_V1.1.36.sql b/setup/databaseScripts/create_database_V1.1.37.sql similarity index 97% rename from setup/databaseScripts/create_database_V1.1.36.sql rename to setup/databaseScripts/create_database_V1.1.37.sql index 548ba666..6d51ff15 100644 --- a/setup/databaseScripts/create_database_V1.1.36.sql +++ b/setup/databaseScripts/create_database_V1.1.37.sql @@ -663,3 +663,24 @@ INSERT INTO {prefix}settings_theme ) ; +---- + +-- Member Email Notifications +CREATE TABLE {perfix}email_notifications ( + id INT NOT NULL AUTO_INCREMENT, + notification_message TEXT NULL, + declined_message TEXT NULL, + approved_message TEXT NULL, + to_email TINYTEXT NULL, + from_email TINYTEXT NULL, + PRIMARY KEY (id) +); + +---- + +-- Set default email notifications +INSERT INTO {prefix}email_notifications + ( id, notification_message, declined_message, approved_message ) +VALUES + ( 1, 'A member has requested a profile update.', 'Your profile update has been declined.', 'Your profile has been approved!' ); + diff --git a/setup/databaseScripts/dbVersions.php b/setup/databaseScripts/dbVersions.php index 86304cb3..64ed5eb6 100644 --- a/setup/databaseScripts/dbVersions.php +++ b/setup/databaseScripts/dbVersions.php @@ -68,6 +68,7 @@ $glmMembersDbVersions = array( '1.1.34' => array('version' => '1.1.34', 'tables' => 22, 'date' => '01/23/18'), '1.1.35' => array('version' => '1.1.35', 'tables' => 22, 'date' => '04/03/18'), '1.1.36' => array('version' => '1.1.36', 'tables' => 22, 'date' => '06/12/18'), + '1.1.37' => array('version' => '1.1.37', 'tables' => 23, 'date' => '06/25/18'), ); diff --git a/setup/databaseScripts/update_database_V1.1.37.sql b/setup/databaseScripts/update_database_V1.1.37.sql new file mode 100644 index 00000000..6343958b --- /dev/null +++ b/setup/databaseScripts/update_database_V1.1.37.sql @@ -0,0 +1,26 @@ +-- Gaslight Media Members Database +-- File Created: 2018-06-12 +-- Database Version: 1.1.36 +-- 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 + +-- Member Email Notifications +CREATE TABLE {prefix}email_notifications ( + id INT NOT NULL AUTO_INCREMENT, + notification_message TEXT NULL, + declined_message TEXT NULL, + approved_message TEXT NULL, + to_email TINYTEXT NULL, + from_email TINYTEXT NULL, + PRIMARY KEY (id) +); + +---- + +-- Set default email notifications +INSERT INTO {prefix}email_notifications + ( id, notification_message, declined_message, approved_message ) +VALUES + ( 1, 'A member has requested a profile update.', 'Your profile update has been declined.', 'Your profile has been approved!' ); -- 2.17.1