network-wide poll voting structure
This commit is contained in:
parent
c4f1431215
commit
5d35d21100
2
boot.php
2
boot.php
@ -43,7 +43,7 @@ require_once('include/taxonomy.php');
|
|||||||
define ( 'RED_PLATFORM', 'Red Matrix' );
|
define ( 'RED_PLATFORM', 'Red Matrix' );
|
||||||
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
|
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
|
||||||
define ( 'ZOT_REVISION', 1 );
|
define ( 'ZOT_REVISION', 1 );
|
||||||
define ( 'DB_UPDATE_VERSION', 1060 );
|
define ( 'DB_UPDATE_VERSION', 1061 );
|
||||||
|
|
||||||
define ( 'EOL', '<br />' . "\r\n" );
|
define ( 'EOL', '<br />' . "\r\n" );
|
||||||
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
||||||
|
@ -421,7 +421,7 @@ CREATE TABLE IF NOT EXISTS `item` (
|
|||||||
`owner_xchan` char(255) NOT NULL DEFAULT '',
|
`owner_xchan` char(255) NOT NULL DEFAULT '',
|
||||||
`author_xchan` char(255) NOT NULL DEFAULT '',
|
`author_xchan` char(255) NOT NULL DEFAULT '',
|
||||||
`mimetype` char(255) NOT NULL DEFAULT '',
|
`mimetype` char(255) NOT NULL DEFAULT '',
|
||||||
`title` text NOT NULL DEFAULT '',
|
`title` text NOT NULL,
|
||||||
`body` mediumtext NOT NULL,
|
`body` mediumtext NOT NULL,
|
||||||
`app` char(255) NOT NULL DEFAULT '',
|
`app` char(255) NOT NULL DEFAULT '',
|
||||||
`lang` char(64) NOT NULL DEFAULT '',
|
`lang` char(64) NOT NULL DEFAULT '',
|
||||||
@ -504,7 +504,7 @@ CREATE TABLE IF NOT EXISTS `mail` (
|
|||||||
`channel_id` int(10) unsigned NOT NULL,
|
`channel_id` int(10) unsigned NOT NULL,
|
||||||
`title` text NOT NULL,
|
`title` text NOT NULL,
|
||||||
`body` mediumtext NOT NULL,
|
`body` mediumtext NOT NULL,
|
||||||
`attach` mediumtext NOT NULL DEFAULT '',
|
`attach` mediumtext NOT NULL,
|
||||||
`mid` char(255) NOT NULL,
|
`mid` char(255) NOT NULL,
|
||||||
`parent_mid` char(255) NOT NULL,
|
`parent_mid` char(255) NOT NULL,
|
||||||
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
@ -551,9 +551,9 @@ CREATE TABLE IF NOT EXISTS `menu_item` (
|
|||||||
`mitem_menu_id` int(10) unsigned NOT NULL DEFAULT '0',
|
`mitem_menu_id` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
`mitem_order` int(11) NOT NULL DEFAULT '0',
|
`mitem_order` int(11) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`mitem_id`),
|
PRIMARY KEY (`mitem_id`),
|
||||||
KEY `mitem_flags` (`mitem_flags`),
|
|
||||||
KEY `mitem_channel_id` (`mitem_channel_id`),
|
KEY `mitem_channel_id` (`mitem_channel_id`),
|
||||||
KEY `mitem_menu_id` (`mitem_menu_id`)
|
KEY `mitem_menu_id` (`mitem_menu_id`),
|
||||||
|
KEY `mitem_flags` (`mitem_flags`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `notify` (
|
CREATE TABLE IF NOT EXISTS `notify` (
|
||||||
@ -676,7 +676,7 @@ CREATE TABLE IF NOT EXISTS `profile` (
|
|||||||
`hide_friends` tinyint(1) NOT NULL DEFAULT '0',
|
`hide_friends` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
`name` char(255) NOT NULL,
|
`name` char(255) NOT NULL,
|
||||||
`pdesc` char(255) NOT NULL,
|
`pdesc` char(255) NOT NULL,
|
||||||
`chandesc` text NOT NULL DEFAULT '',
|
`chandesc` text NOT NULL,
|
||||||
`dob` char(32) NOT NULL DEFAULT '0000-00-00',
|
`dob` char(32) NOT NULL DEFAULT '0000-00-00',
|
||||||
`dob_tz` char(255) NOT NULL DEFAULT 'UTC',
|
`dob_tz` char(255) NOT NULL DEFAULT 'UTC',
|
||||||
`address` char(255) NOT NULL,
|
`address` char(255) NOT NULL,
|
||||||
@ -879,6 +879,16 @@ CREATE TABLE IF NOT EXISTS `verify` (
|
|||||||
KEY `created` (`created`)
|
KEY `created` (`created`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `xchan` (
|
CREATE TABLE IF NOT EXISTS `xchan` (
|
||||||
`xchan_hash` char(255) NOT NULL,
|
`xchan_hash` char(255) NOT NULL,
|
||||||
`xchan_guid` char(255) NOT NULL DEFAULT '',
|
`xchan_guid` char(255) NOT NULL DEFAULT '',
|
||||||
@ -902,10 +912,10 @@ CREATE TABLE IF NOT EXISTS `xchan` (
|
|||||||
KEY `xchan_addr` (`xchan_addr`),
|
KEY `xchan_addr` (`xchan_addr`),
|
||||||
KEY `xchan_name` (`xchan_name`),
|
KEY `xchan_name` (`xchan_name`),
|
||||||
KEY `xchan_network` (`xchan_network`),
|
KEY `xchan_network` (`xchan_network`),
|
||||||
KEY `xchan_instance_url` (`xchan_instance_url`),
|
|
||||||
KEY `xchan_url` (`xchan_url`),
|
KEY `xchan_url` (`xchan_url`),
|
||||||
KEY `xchan_flags` (`xchan_flags`),
|
KEY `xchan_flags` (`xchan_flags`),
|
||||||
KEY `xchan_connurl` (`xchan_connurl`)
|
KEY `xchan_connurl` (`xchan_connurl`),
|
||||||
|
KEY `xchan_instance_url` (`xchan_instance_url`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `xconfig` (
|
CREATE TABLE IF NOT EXISTS `xconfig` (
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
define( 'UPDATE_VERSION' , 1060 );
|
define( 'UPDATE_VERSION' , 1061 );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -689,3 +689,20 @@ function update_r1059() {
|
|||||||
return UPDATE_SUCCESS;
|
return UPDATE_SUCCESS;
|
||||||
return UPDATE_FAILED;
|
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;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user