From 7e29c91a1df6d768c07365bb04df13a7614ae74f Mon Sep 17 00:00:00 2001 From: bradymiller Date: Sun, 21 Aug 2011 02:52:15 -0700 Subject: [PATCH] Branched 4.1 --- sql/4_1_0-to-4_2_0_upgrade.sql | 60 ++++++++++++++++++++++++++++++++++++++++++ sql_upgrade.php | 2 +- version.php | 2 +- 3 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 sql/4_1_0-to-4_2_0_upgrade.sql diff --git a/sql/4_1_0-to-4_2_0_upgrade.sql b/sql/4_1_0-to-4_2_0_upgrade.sql new file mode 100644 index 000000000..aa306cf40 --- /dev/null +++ b/sql/4_1_0-to-4_2_0_upgrade.sql @@ -0,0 +1,60 @@ +-- +-- Comment Meta Language for sql upgrades: +-- +-- Each section within an upgrade sql file is enveloped with an #If*/#EndIf block. At first glance, these appear to be standard mysql +-- comments meant to be cryptic hints to -other developers about the sql goodness contained therein. However, were you to rely on such basic premises, +-- you would find yourself grossly decieved. Indeed, without the knowledge that these comments are, in fact a sneakily embedded meta langauge derived +-- for a purpose none-other than to aid in the protection of the database during upgrades, you would no doubt be subject to much ridicule and public +-- beratement at the hands of the very developers who envisioned such a crafty use of comments. -jwallace +-- +-- While these lines are as enigmatic as they are functional, there is a method to the madness. Let's take a moment to briefly go over proper comment meta language use. +-- +-- The #If* sections have the behavior of functions and come complete with arguments supplied command-line style +-- +-- Your Comment meta language lines cannot contain any other comment styles such as the nefarious double dashes "--" lest your lines be skipped and +-- the blocks automatcially executed with out regard to the existing database state. +-- +-- Comment Meta Language Constructs: +-- +-- #IfNotTable +-- argument: table_name +-- behavior: if the table_name does not exist, the block will be executed + +-- #IfTable +-- argument: table_name +-- behavior: if the table_name does exist, the block will be executed + +-- #IfMissingColumn +-- arguments: table_name colname +-- behavior: if the colname in the table_name table does not exist, the block will be executed + +-- #IfNotColumnType +-- arguments: table_name colname value +-- behavior: If the table table_name does not have a column colname with a data type equal to value, then the block will be executed + +-- #IfNotRow +-- arguments: table_name colname value +-- behavior: If the table table_name does not have a row where colname = value, the block will be executed. + +-- #IfNotRow2D +-- arguments: table_name colname value colname2 value2 +-- behavior: If the table table_name does not have a row where colname = value AND colname2 = value2, the block will be executed. + +-- #IfNotRow3D +-- arguments: table_name colname value colname2 value2 colname3 value3 +-- behavior: If the table table_name does not have a row where colname = value AND colname2 = value2 AND colname3 = value3, the block will be executed. + +-- #IfNotRow4D +-- arguments: table_name colname value colname2 value2 colname3 value3 colname4 value4 +-- behavior: If the table table_name does not have a row where colname = value AND colname2 = value2 AND colname3 = value3 AND colname4 = value4, the block will be executed. + +-- #IfNotRow2Dx2 +-- desc: This is a very specialized function to allow adding items to the list_options table to avoid both redundant option_id and title in each element. +-- arguments: table_name colname value colname2 value2 colname3 value3 +-- behavior: The block will be executed if both statements below are true: +-- 1) The table table_name does not have a row where colname = value AND colname2 = value2. +-- 2) The table table_name does not have a row where colname = value AND colname3 = value3. + +-- #EndIf +-- all blocks are terminated with and #EndIf statement. + diff --git a/sql_upgrade.php b/sql_upgrade.php index b561f1cb1..9287071bd 100644 --- a/sql_upgrade.php +++ b/sql_upgrade.php @@ -268,7 +268,7 @@ if (!empty($_POST['form_submit'])) { foreach ($versions as $version => $filename) { echo " \n"; } ?> diff --git a/version.php b/version.php index d59b223d2..19bb2aaa6 100644 --- a/version.php +++ b/version.php @@ -4,7 +4,7 @@ // numbers are stored in the database and used to determine which sql // upgrade file is the starting point for the next upgrade. $v_major = '4'; -$v_minor = '1'; +$v_minor = '2'; $v_patch = '0'; $v_tag = '-dev'; // minor revision number, should be empty for production releases -- 2.11.4.GIT