comments on db update scripts

This commit is contained in:
following
2013-04-23 00:43:16 +02:00
parent 0c1a862a30
commit 328d1148fc
2 changed files with 11 additions and 11 deletions
+6 -4
View File
@@ -6,7 +6,8 @@
***************************************************************************/ ***************************************************************************/
/* /*
* Database Structure Versioning * Database Structure Versioning - update DB structure to current version;
* used for developer & production system
*/ */
if (!isset($opt['rootpath'])) if (!isset($opt['rootpath']))
@@ -15,8 +16,9 @@
if (!field_exists('cache_attrib','gc_id')) if (!field_exists('cache_attrib','gc_id'))
die("\n die("\n
ERROR: Database structure too old. You must first do a manual update to commit 467aae4 ERROR: Database structure too old. You must first do a manual update
(March 27, 2013) to enable automatic updates. See htdocs/doc/sql/db-changes.txt.\n"); up to commit 467aae4 (March 27, 2013) to enable automatic updates.
See htdocs/doc/sql/db-changes.txt.\n");
$db_version = max(99, sql_value("SELECT `value` FROM `sysconfig` WHERE `name`='db_version'",99)); $db_version = max(99, sql_value("SELECT `value` FROM `sysconfig` WHERE `name`='db_version'",99));
@@ -38,7 +40,7 @@
} while ($db_version > 0); } while ($db_version > 0);
// Test if a certain database field exists // test if a certain database field exists
function field_exists($table, $field) function field_exists($table, $field)
{ {
global $opt; global $opt;
+1 -3
View File
@@ -7,9 +7,7 @@
***************************************************************************/ ***************************************************************************/
/* /*
* update of static data and triggers in developer system * update of tables, indexes, triggers/storedprocs and static data in developer system
*
* Tables must be updated manually, see htdocs/doc/sql/db-changes.txt
*/ */
$rootpath = $opt['rootpath'] = dirname(__FILE__) . '/../htdocs/'; $rootpath = $opt['rootpath'] = dirname(__FILE__) . '/../htdocs/';