aboutsummaryrefslogtreecommitdiffstats
path: root/install/update.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-08-21 01:33:20 -0700
committerfriendica <info@friendica.com>2013-08-21 01:33:20 -0700
commitd8ef1417fb2ff8d736e4392c118c51c63dc66b1d (patch)
tree7baffada93dd75448851b64023ea6f71803cf4c7 /install/update.php
parent5d35d2110065dec9f984ad9028a5e8798f1faa37 (diff)
downloadvolse-hubzilla-d8ef1417fb2ff8d736e4392c118c51c63dc66b1d.tar.gz
volse-hubzilla-d8ef1417fb2ff8d736e4392c118c51c63dc66b1d.tar.bz2
volse-hubzilla-d8ef1417fb2ff8d736e4392c118c51c63dc66b1d.zip
poll stuff
Diffstat (limited to 'install/update.php')
-rw-r--r--install/update.php38
1 files changed, 37 insertions, 1 deletions
diff --git a/install/update.php b/install/update.php
index fa5afe8de..c5eaa4f19 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1061 );
+define( 'UPDATE_VERSION' , 1063 );
/**
*
@@ -706,3 +706,39 @@ function update_r1060() {
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;
+}
+