diff options
author | friendica <info@friendica.com> | 2012-02-13 18:02:43 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-02-13 18:02:43 -0800 |
commit | c87aa8f9276652e28dd8c77babe1b4a27cee566c (patch) | |
tree | 4effb1da84cdeb7b40bb58c9395263aa9fd56c45 | |
parent | 23f5abfa1fb40e5037fc4c6e2147bcc1ba2fa1d8 (diff) | |
download | volse-hubzilla-c87aa8f9276652e28dd8c77babe1b4a27cee566c.tar.gz volse-hubzilla-c87aa8f9276652e28dd8c77babe1b4a27cee566c.tar.bz2 volse-hubzilla-c87aa8f9276652e28dd8c77babe1b4a27cee566c.zip |
poll structures
-rwxr-xr-x | boot.php | 2 | ||||
-rwxr-xr-x | database.sql | 28 | ||||
-rwxr-xr-x | update.php | 30 |
3 files changed, 58 insertions, 2 deletions
@@ -11,7 +11,7 @@ require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_VERSION', '2.3.1251' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); -define ( 'DB_UPDATE_VERSION', 1121 ); +define ( 'DB_UPDATE_VERSION', 1122 ); define ( 'EOL', "<br />\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); diff --git a/database.sql b/database.sql index 0b03149e9..32d7cf40b 100755 --- a/database.sql +++ b/database.sql @@ -781,3 +781,31 @@ INDEX ( `uid` ), INDEX ( `mid` ) ) ENGINE = MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `poll_result` ( +`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , +`poll_id` INT NOT NULL , +`choice` INT NOT NULL , +INDEX ( `poll_id` ), +INDEX ( `choice` ) +) ENGINE = MyISAM DEFAULT CHARSET=utf8; + + +CREATE TABLE IF NOT EXISTS `poll` ( +`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , +`uid` INT NOT NULL , +`q0` MEDIUMTEXT NOT NULL , +`q1` MEDIUMTEXT NOT NULL , +`q2` MEDIUMTEXT NOT NULL , +`q3` MEDIUMTEXT NOT NULL , +`q4` MEDIUMTEXT NOT NULL , +`q5` MEDIUMTEXT NOT NULL , +`q6` MEDIUMTEXT NOT NULL , +`q7` MEDIUMTEXT NOT NULL , +`q8` MEDIUMTEXT NOT NULL , +`q9` MEDIUMTEXT NOT NULL , +INDEX ( `uid` ) +) ENGINE = MyISAM DEFAULT CHARSET=utf8; + + + + diff --git a/update.php b/update.php index 9e3f22ef1..24138450a 100755 --- a/update.php +++ b/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1121 ); +define( 'UPDATE_VERSION' , 1122 ); /** * @@ -1037,3 +1037,31 @@ function update_1120() { q("ALTER TABLE `item` ADD `spam` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `visible` , ADD INDEX (`spam`) "); } + +function update_1121() { + q("CREATE TABLE IF NOT EXISTS `poll_result` ( + `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , + `poll_id` INT NOT NULL , + `choice` INT NOT NULL , + INDEX ( `poll_id` ), + INDEX ( `choice` ) + ) ENGINE = MYISAM "); + + q("CREATE TABLE IF NOT EXISTS `poll` ( + `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , + `uid` INT NOT NULL , + `q0` MEDIUMTEXT NOT NULL , + `q1` MEDIUMTEXT NOT NULL , + `q2` MEDIUMTEXT NOT NULL , + `q3` MEDIUMTEXT NOT NULL , + `q4` MEDIUMTEXT NOT NULL , + `q5` MEDIUMTEXT NOT NULL , + `q6` MEDIUMTEXT NOT NULL , + `q7` MEDIUMTEXT NOT NULL , + `q8` MEDIUMTEXT NOT NULL , + `q9` MEDIUMTEXT NOT NULL , + INDEX ( `uid` ) + ) ENGINE = MYISAM "); + +} + |