From 4f54fcfe2d7fc65b0fb7a67d6c1325fe9ddea33b Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Wed, 20 Feb 2019 14:15:16 -0500 Subject: [PATCH] Add new fields to city table. Adding for city weather. --- index.php | 2 +- ...se_V1.1.49.sql => create_database_V1.1.50.sql} | 4 +++- setup/databaseScripts/dbVersions.php | 1 + setup/databaseScripts/update_database_V1.1.50.sql | 15 +++++++++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) rename setup/databaseScripts/{create_database_V1.1.49.sql => create_database_V1.1.50.sql} (99%) create mode 100755 setup/databaseScripts/update_database_V1.1.50.sql diff --git a/index.php b/index.php index d9416dae..7686ffb1 100755 --- a/index.php +++ b/index.php @@ -48,7 +48,7 @@ if (!defined('ABSPATH')) { */ define('GLM_MEMBERS_PLUGIN_VERSION', '2.11.2'); -define('GLM_MEMBERS_PLUGIN_DB_VERSION', '1.1.49'); +define('GLM_MEMBERS_PLUGIN_DB_VERSION', '1.1.50'); // 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.49.sql b/setup/databaseScripts/create_database_V1.1.50.sql similarity index 99% rename from setup/databaseScripts/create_database_V1.1.49.sql rename to setup/databaseScripts/create_database_V1.1.50.sql index c8b4bd1b..d5ac9a6f 100755 --- a/setup/databaseScripts/create_database_V1.1.49.sql +++ b/setup/databaseScripts/create_database_V1.1.50.sql @@ -1,6 +1,6 @@ -- Gaslight Media Members Database -- File Created: 12/29/16 12:06:00 --- Database Version: 1.1.49 +-- Database Version: 1.1.50 -- Database Creation Script -- -- To permit each query below to be executed separately, @@ -91,6 +91,8 @@ CREATE TABLE {prefix}category_member_info ( CREATE TABLE {prefix}cities ( id INT NOT NULL AUTO_INCREMENT, name TINYTEXT NULL, -- Name of city + state TINYTEXT NULL, -- State + enable_weather BOOLEAN DEFAULT '0', -- Enable Weather for this city lat FLOAT NULL, -- Latitude of city's location lon FLOAT NULL, -- Longitude of city's location county INT NULL, -- County reference to county table diff --git a/setup/databaseScripts/dbVersions.php b/setup/databaseScripts/dbVersions.php index 0ac7a196..70913625 100755 --- a/setup/databaseScripts/dbVersions.php +++ b/setup/databaseScripts/dbVersions.php @@ -81,6 +81,7 @@ $glmMembersDbVersions = array( '1.1.47' => array('version' => '1.1.47', 'tables' => 23, 'date' => '02/14/19'), '1.1.48' => array('version' => '1.1.48', 'tables' => 23, 'date' => '02/14/19'), '1.1.49' => array('version' => '1.1.49', 'tables' => 23, 'date' => '02/15/19'), + '1.1.50' => array('version' => '1.1.50', 'tables' => 23, 'date' => '02/20/19'), ); diff --git a/setup/databaseScripts/update_database_V1.1.50.sql b/setup/databaseScripts/update_database_V1.1.50.sql new file mode 100755 index 00000000..367358a4 --- /dev/null +++ b/setup/databaseScripts/update_database_V1.1.50.sql @@ -0,0 +1,15 @@ +-- Gaslight Media Members Database +-- File Created: 2019-02-15 +-- Database Version: 1.1.49 +-- 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 + +-- Update cities table +ALTER TABLE {prefix}cities ADD COLUMN state TINYTEXT NULL; -- State + +---- + +-- Update cities table +ALTER TABLE {prefix}cities ADD COLUMN enable_weather BOOLEAN DEFAULT '0'; -- Enable Weather for this city -- 2.17.1