aboutsummaryrefslogtreecommitdiffstats
path: root/install/update.php
diff options
context:
space:
mode:
authorChristian Vogeley <christian.vogeley@hotmail.de>2013-08-21 22:19:38 +0200
committerChristian Vogeley <christian.vogeley@hotmail.de>2013-08-21 22:19:38 +0200
commit056ed00a4cea6175eb57781569a77648ce7d3382 (patch)
tree5b5a4f3469bb8fb6b3d3368795ed60d8a6441682 /install/update.php
parenta944a879b1e6ebd8b3d278b86ea4404ba5b7aa81 (diff)
parentd8ef1417fb2ff8d736e4392c118c51c63dc66b1d (diff)
downloadvolse-hubzilla-056ed00a4cea6175eb57781569a77648ce7d3382.tar.gz
volse-hubzilla-056ed00a4cea6175eb57781569a77648ce7d3382.tar.bz2
volse-hubzilla-056ed00a4cea6175eb57781569a77648ce7d3382.zip
Merge remote-tracking branch 'upstream/master'
Update
Diffstat (limited to 'install/update.php')
-rw-r--r--install/update.php62
1 files changed, 61 insertions, 1 deletions
diff --git a/install/update.php b/install/update.php
index c97b5619f..c5eaa4f19 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1059 );
+define( 'UPDATE_VERSION' , 1063 );
/**
*
@@ -682,3 +682,63 @@ ADD INDEX ( `mitem_flags` ) ");
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}
+
+function update_r1059() {
+ $r = q("ALTER TABLE `mail` ADD `attach` MEDIUMTEXT NOT NULL DEFAULT '' AFTER `body` ");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+
+function update_r1060() {
+
+ $r = q("CREATE TABLE IF NOT EXISTS `vote` (
+ `vote_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `vote_poll` int(11) NOT NULL DEFAULT '0',
+ `vote_element` int(11) NOT NULL DEFAULT '0',
+ `vote_result` text NOT NULL,
+ `vote_xchan` char(255) NOT NULL DEFAULT '',
+ PRIMARY KEY (`vote_id`),
+ UNIQUE KEY `vote_vote` (`vote_poll`,`vote_element`,`vote_xchan`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 ");
+
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+
+function update_r1061() {
+ $r = q("ALTER TABLE `vote` ADD INDEX ( `vote_poll` ), ADD INDEX ( `vote_element` ) ");
+
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+
+function update_r1062() {
+ $r1 = q("CREATE TABLE IF NOT EXISTS `poll` (
+`poll_id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+`poll_channel` INT UNSIGNED NOT NULL DEFAULT '0',
+`poll_desc` TEXT NOT NULL DEFAULT '',
+`poll_flags` INT NOT NULL DEFAULT '0',
+`poll_votes` INT NOT NULL DEFAULT '0',
+KEY `poll_channel` (`poll_channel`),
+KEY `poll_flags` (`poll_flags`),
+KEY `poll_votes` (`poll_votes`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 ");
+
+ $r2 = q("CREATE TABLE IF NOT EXISTS `poll_elm` (
+`pelm_id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+`pelm_poll` INT UNSIGNED NOT NULL DEFAULT '0',
+`pelm_desc` TEXT NOT NULL DEFAULT '',
+`pelm_flags` INT NOT NULL DEFAULT '0',
+`pelm_result` FLOAT NOT NULL DEFAULT '0',
+KEY `pelm_poll` (`pelm_poll`),
+KEY `pelm_result` (`pelm_result`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 ");
+
+ if($r1 && $r2)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+