diff options
author | friendica <info@friendica.com> | 2013-12-22 18:37:39 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-12-22 18:37:39 -0800 |
commit | 1a42580ad44f768ba8d4eb0669f3b8be03670e04 (patch) | |
tree | e40948063cea08c8c0ea4ece8efbcc6bef6464d8 /install/update.php | |
parent | eff38538eeaa3af0774c77d26c5b00dd79cb9e8c (diff) | |
download | volse-hubzilla-1a42580ad44f768ba8d4eb0669f3b8be03670e04.tar.gz volse-hubzilla-1a42580ad44f768ba8d4eb0669f3b8be03670e04.tar.bz2 volse-hubzilla-1a42580ad44f768ba8d4eb0669f3b8be03670e04.zip |
remove a couple of mysql reserved words from being used as table or row names. For this round we're getting 'group' and 'desc'. Warning: potentially destabilising as this touches a lot of code.
Diffstat (limited to 'install/update.php')
-rw-r--r-- | install/update.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/install/update.php b/install/update.php index 05bddba42..817e4b6bc 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1085 ); +define( 'UPDATE_VERSION' , 1086 ); /** * @@ -935,3 +935,16 @@ function update_r1084() { return UPDATE_FAILED; } + +function update_r1085() { + $r1 = q("ALTER TABLE `photo` CHANGE `desc` `description` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL "); + + $r2 = q("RENAME TABLE `group` TO `groups`"); + + $r3 = q("ALTER TABLE `event` CHANGE `desc` `description` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL "); + + if($r1 && $r2 && $r3) + return UPDATE_SUCCESS; + return UPDATE_FAILED; + +} |