From 1ee6cc98f187aaf5acf68a460589050714af5784 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 15 Jan 2018 16:29:54 -0500 Subject: [PATCH] Add new field for accounts. Adding renewal_date for the accounts. --- index.php | 2 +- ...te_database_V0.0.8.sql => create_database_V0.0.9.sql} | 1 + setup/databaseScripts/dbVersions.php | 1 + setup/databaseScripts/update_database_V0.0.9.sql | 9 +++++++++ 4 files changed, 12 insertions(+), 1 deletion(-) rename setup/databaseScripts/{create_database_V0.0.8.sql => create_database_V0.0.9.sql} (99%) create mode 100644 setup/databaseScripts/update_database_V0.0.9.sql diff --git a/index.php b/index.php index dd0bbab..52b6a8b 100644 --- a/index.php +++ b/index.php @@ -38,7 +38,7 @@ * version from this plugin. */ define('GLM_MEMBERS_BILLING_PLUGIN_VERSION', '0.0.1'); -define('GLM_MEMBERS_BILLING_PLUGIN_DB_VERSION', '0.0.8'); +define('GLM_MEMBERS_BILLING_PLUGIN_DB_VERSION', '0.0.9'); // This is the minimum version of the GLM Members DB plugin require for this plugin. define('GLM_MEMBERS_BILLING_PLUGIN_MIN_MEMBERS_REQUIRED_VERSION', '2.8.0'); diff --git a/setup/databaseScripts/create_database_V0.0.8.sql b/setup/databaseScripts/create_database_V0.0.9.sql similarity index 99% rename from setup/databaseScripts/create_database_V0.0.8.sql rename to setup/databaseScripts/create_database_V0.0.9.sql index 988d265..f9e859e 100644 --- a/setup/databaseScripts/create_database_V0.0.8.sql +++ b/setup/databaseScripts/create_database_V0.0.9.sql @@ -21,6 +21,7 @@ CREATE TABLE {prefix}accounts ( billing_zip TINYTEXT NULL, -- Billing Zip billing_phone TINYTEXT NULL, -- Billing Phone anniversary_date DATE NOT NULL, -- anniversary date - used for main invoice generation + renewal_date DATE NULL, -- renewal date of account payment_data TEXT NULL, -- stored payment data email TINYTEXT NULL, -- billing email PRIMARY KEY (id) diff --git a/setup/databaseScripts/dbVersions.php b/setup/databaseScripts/dbVersions.php index ad073e6..e8905e9 100644 --- a/setup/databaseScripts/dbVersions.php +++ b/setup/databaseScripts/dbVersions.php @@ -22,5 +22,6 @@ $glmMembersBillingDbVersions = array( '0.0.6' => array('version' => '0.0.6', 'tables' => 13), '0.0.7' => array('version' => '0.0.7', 'tables' => 13), '0.0.8' => array('version' => '0.0.8', 'tables' => 14), + '0.0.9' => array('version' => '0.0.9', 'tables' => 14), ); diff --git a/setup/databaseScripts/update_database_V0.0.9.sql b/setup/databaseScripts/update_database_V0.0.9.sql new file mode 100644 index 0000000..fc3330f --- /dev/null +++ b/setup/databaseScripts/update_database_V0.0.9.sql @@ -0,0 +1,9 @@ +-- Gaslight Media Billing Database +-- File Created: 01/15/2018 +-- Database Version: 0.0.9 +-- +-- To permit each query below to be executed separately, +-- all queries must be separated by a line with four dashes + +-- Add renewal_date field to the accounts table +ALTER TABLE {prefix}accounts ADD renewal_date DATE NULL; -- 2.17.1