network-wide poll voting structure

This commit is contained in:
friendica
2013-08-20 20:39:00 -07:00
parent c4f1431215
commit 5d35d21100
3 changed files with 47 additions and 20 deletions

View File

@@ -1,6 +1,6 @@
<?php
define( 'UPDATE_VERSION' , 1060 );
define( 'UPDATE_VERSION' , 1061 );
/**
*
@@ -689,3 +689,20 @@ function update_r1059() {
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;
}