From ad236d1b46b109a4e1b0599cd8b0de620dd41de3 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Wed, 28 Mar 2018 09:10:34 -0400 Subject: [PATCH] Update database Adding new field to accounts archived boolean - marks the account archive. --- index.php | 2 +- ..._database_V0.0.13.sql => create_database_V0.0.15.sql} | 3 ++- setup/databaseScripts/dbVersions.php | 1 + setup/databaseScripts/update_database_V0.0.15.sql | 9 +++++++++ 4 files changed, 13 insertions(+), 2 deletions(-) rename setup/databaseScripts/{create_database_V0.0.13.sql => create_database_V0.0.15.sql} (99%) create mode 100644 setup/databaseScripts/update_database_V0.0.15.sql diff --git a/index.php b/index.php index ffd241b..fa9f4dd 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.14'); +define('GLM_MEMBERS_BILLING_PLUGIN_DB_VERSION', '0.0.15'); // 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.13.sql b/setup/databaseScripts/create_database_V0.0.15.sql similarity index 99% rename from setup/databaseScripts/create_database_V0.0.13.sql rename to setup/databaseScripts/create_database_V0.0.15.sql index bff3da8..18a65fb 100644 --- a/setup/databaseScripts/create_database_V0.0.13.sql +++ b/setup/databaseScripts/create_database_V0.0.15.sql @@ -1,6 +1,6 @@ -- Gaslight Media Billing Module -- File Created: 11/08/2017 --- Database Version: 0.0.3 +-- Database Version: 0.0.15 -- Database Creation Script -- -- To permit each query below to be executed separately, @@ -12,6 +12,7 @@ -- Billing Accounts CREATE TABLE {prefix}accounts ( id INT NOT NULL AUTO_INCREMENT, + archived BOOLEAN DEFAULT '0', -- Marks account as archived ref_dest INT NOT NULL, -- reference to member id ref_name TINYTEXT NOT NULL, -- Name of reference member billing_fname TINYTEXT NULL, -- Billing First Name diff --git a/setup/databaseScripts/dbVersions.php b/setup/databaseScripts/dbVersions.php index 525375a..fbd0c29 100644 --- a/setup/databaseScripts/dbVersions.php +++ b/setup/databaseScripts/dbVersions.php @@ -28,5 +28,6 @@ $glmMembersBillingDbVersions = array( '0.0.12' => array('version' => '0.0.12', 'tables' => 14), '0.0.13' => array('version' => '0.0.13', 'tables' => 14), '0.0.14' => array('version' => '0.0.14', 'tables' => 14), + '0.0.15' => array('version' => '0.0.15', 'tables' => 14), ); diff --git a/setup/databaseScripts/update_database_V0.0.15.sql b/setup/databaseScripts/update_database_V0.0.15.sql new file mode 100644 index 0000000..e56a556 --- /dev/null +++ b/setup/databaseScripts/update_database_V0.0.15.sql @@ -0,0 +1,9 @@ +-- Gaslight Media Billing Database +-- File Created: 03/28/2018 +-- Database Version: 0.0.15 +-- +-- To permit each query below to be executed separately, +-- all queries must be separated by a line with four dashes + +-- Add archived to accounts table +ALTER TABLE {prefix}accounts ADD archived BOOLEAN DEFAULT '0'; -- Marks account as archived -- 2.17.1