From 1ae506fdc301689937f47ba6c35d02b5e4739c2b Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 19 Mar 2018 11:40:16 -0400 Subject: [PATCH] Adding new field for the member_type Add new field to the invoice_type table. Member Type Will be used for creating new invoices based on member type. --- index.php | 2 +- setup/databaseScripts/create_database_V0.0.13.sql | 1 + setup/databaseScripts/dbVersions.php | 1 + setup/databaseScripts/update_database_V0.0.14.sql | 9 +++++++++ 4 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 setup/databaseScripts/update_database_V0.0.14.sql diff --git a/index.php b/index.php index 932b64b..ffd241b 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.13'); +define('GLM_MEMBERS_BILLING_PLUGIN_DB_VERSION', '0.0.14'); // 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.13.sql index 70ef9e0..0a9b126 100644 --- a/setup/databaseScripts/create_database_V0.0.13.sql +++ b/setup/databaseScripts/create_database_V0.0.13.sql @@ -76,6 +76,7 @@ CREATE TABLE {prefix}invoice_types ( id INT NOT NULL AUTO_INCREMENT, name TINYTEXT NOT NULL, -- name parent INT NOT NULL DEFAULT 0, -- 0 if top level otherwise ref to another line_item_type as it's parent + member_type INT NOT NULL DEFAULT 0, -- Member Type assigned Default 0 amount DECIMAL(8,2) NOT NULL DEFAULT '0.00', -- amount recurring BOOLEAN DEFAULT '0', -- true/false if recurring recurrence INT NULL DEFAULT 0, -- recurrence type diff --git a/setup/databaseScripts/dbVersions.php b/setup/databaseScripts/dbVersions.php index c53cd54..525375a 100644 --- a/setup/databaseScripts/dbVersions.php +++ b/setup/databaseScripts/dbVersions.php @@ -27,5 +27,6 @@ $glmMembersBillingDbVersions = array( '0.0.11' => array('version' => '0.0.11', 'tables' => 14), '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), ); diff --git a/setup/databaseScripts/update_database_V0.0.14.sql b/setup/databaseScripts/update_database_V0.0.14.sql new file mode 100644 index 0000000..329c979 --- /dev/null +++ b/setup/databaseScripts/update_database_V0.0.14.sql @@ -0,0 +1,9 @@ +-- Gaslight Media Billing Database +-- File Created: 03/19/2018 +-- Database Version: 0.0.14 +-- +-- To permit each query below to be executed separately, +-- all queries must be separated by a line with four dashes + +-- Add member_type to invoice_type table +ALTER TABLE {prefix}invoice_types ADD member_type INT NOT NULL DEFAULT 0; -- Member Type assigned Default 0 -- 2.17.1