From d1aaba539247b3602d8e7351ecdc694c5cdc33d1 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Fri, 23 Nov 2012 10:15:28 +0100 Subject: sqlbox: Compare user query results from a definable query --- sqlbox/db/install.xml | 5 +++-- sqlbox/db/upgrade.php | 12 ++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) (limited to 'sqlbox/db') diff --git a/sqlbox/db/install.xml b/sqlbox/db/install.xml index f83ed09..2c818c1 100644 --- a/sqlbox/db/install.xml +++ b/sqlbox/db/install.xml @@ -10,8 +10,9 @@ - - + + + diff --git a/sqlbox/db/upgrade.php b/sqlbox/db/upgrade.php index 83540aa..fb0c671 100644 --- a/sqlbox/db/upgrade.php +++ b/sqlbox/db/upgrade.php @@ -68,6 +68,18 @@ function xmldb_sqlbox_upgrade($oldversion) { // and to play with the XMLDB Editor (in the admin menu) and its // PHP generation posibilities. + if ($oldversion < 20121223) { + // Define field query to be added to sqlbox + $table = new xmldb_table('sqlbox'); + $field = new xmldb_field('query', XMLDB_TYPE_TEXT, 'medium', + null, null, null, null, 'query'); + + // Add field query + if (!$dbman->field_exists($table, $field)) { + $dbman->add_field($table, $field); + } + } + // First example, some fields were added to install.xml on 2007/04/01 if ($oldversion < 2007040100) { -- cgit