db updates for server batch key caching, group visibility

This commit is contained in:
Friendika 2011-10-01 23:19:20 -07:00
parent 96e735fdd2
commit 7d7a149811
3 changed files with 25 additions and 2 deletions

View file

@ -10,7 +10,7 @@ require_once('include/nav.php');
define ( 'FRIENDIKA_PLATFORM', 'Free Friendika'); define ( 'FRIENDIKA_PLATFORM', 'Free Friendika');
define ( 'FRIENDIKA_VERSION', '2.3.1121' ); define ( 'FRIENDIKA_VERSION', '2.3.1121' );
define ( 'DFRN_PROTOCOL_VERSION', '2.21' ); define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
define ( 'DB_UPDATE_VERSION', 1093 ); define ( 'DB_UPDATE_VERSION', 1094 );
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' );

View file

@ -114,6 +114,7 @@ CREATE TABLE IF NOT EXISTS `contact` (
CREATE TABLE IF NOT EXISTS `group` ( CREATE TABLE IF NOT EXISTS `group` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(10) unsigned NOT NULL, `uid` int(10) unsigned NOT NULL,
`visible` tinyint(1) NOT NULL DEFAULT '0',
`deleted` tinyint(1) NOT NULL DEFAULT '0', `deleted` tinyint(1) NOT NULL DEFAULT '0',
`name` char(255) NOT NULL, `name` char(255) NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
@ -632,3 +633,12 @@ CREATE TABLE IF NOT EXISTS `search` (
INDEX ( `uid` ), INDEX ( `uid` ),
INDEX ( `term` ) INDEX ( `term` )
) ENGINE = MyISAM DEFAULT CHARSET=utf8; ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `fserver` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`server` CHAR( 255 ) NOT NULL ,
`posturl` CHAR( 255 ) NOT NULL ,
`key` TEXT NOT NULL,
INDEX ( `server` )
) ENGINE = MyISAM DEFAULT CHARSET=utf8;

View file

@ -1,6 +1,6 @@
<?php <?php
define( 'UPDATE_VERSION' , 1093 ); define( 'UPDATE_VERSION' , 1094 );
/** /**
* *
@ -773,4 +773,17 @@ function update_1091() {
function update_1092() { function update_1092() {
q("ALTER TABLE `user` ADD INDEX ( `login_date` ) "); q("ALTER TABLE `user` ADD INDEX ( `login_date` ) ");
q("ALTER TABLE `user` ADD INDEX ( `account_expired` ) "); q("ALTER TABLE `user` ADD INDEX ( `account_expired` ) ");
}
function update_1093() {
q("CREATE TABLE IF NOT EXISTS `fserver` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`server` CHAR( 255 ) NOT NULL ,
`posturl` CHAR( 255 ) NOT NULL ,
`key` TEXT NOT NULL,
INDEX ( `server` )
) ENGINE = MYISAM ");
q("ALTER TABLE `group` ADD `visible` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `uid` ");
} }