1
0
Fork 0

oauth: db update

This commit is contained in:
Fabio Comuni 2011-11-07 17:48:14 +01:00
parent 00c342e13d
commit d7d889bcd0
3 changed files with 16 additions and 4 deletions

View file

@ -9,9 +9,9 @@ require_once('include/nav.php');
require_once('include/cache.php');
define ( 'FRIENDIKA_PLATFORM', 'Friendica');
define ( 'FRIENDIKA_VERSION', '2.3.1157' );
define ( 'FRIENDIKA_VERSION', '2.3.1158' );
define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
define ( 'DB_UPDATE_VERSION', 1102 );
define ( 'DB_UPDATE_VERSION', 1103 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );

View file

@ -460,14 +460,19 @@ CREATE TABLE IF NOT EXISTS `clients` (
`client_id` VARCHAR( 20 ) NOT NULL ,
`pw` VARCHAR( 20 ) NOT NULL ,
`redirect_uri` VARCHAR( 200 ) NOT NULL ,
`name` VARCHAR( 128 ) NULL DEFAULT NULL,
`icon` VARCHAR( 255 ) NULL DEFAULT NULL,
`uid` INT NOT NULL DEFAULT 0,
PRIMARY KEY ( `client_id` )
) ENGINE = MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `tokens` (
`id` VARCHAR( 40 ) NOT NULL ,
`secret` VARCHAR( 40 ) NOT NULL ,
`client_id` VARCHAR( 20 ) NOT NULL ,
`expires` INT NOT NULL ,
`scope` VARCHAR( 200 ) NOT NULL ,
`uid` INT NOT NULL ,
PRIMARY KEY ( `id` )
) ENGINE = MyISAM DEFAULT CHARSET=utf8;

View file

@ -1,6 +1,6 @@
<?php
define( 'UPDATE_VERSION' , 1102 );
define( 'UPDATE_VERSION' , 1103 );
/**
*
@ -874,7 +874,14 @@ function update_1101() {
q("ALTER TABLE `gcign` ADD INDEX (`uid`), ADD INDEX (`gcid`) ");
}
function update_1102() {
q("ALTER TABLE `clients` ADD `name` TEXT NULL DEFAULT NULL AFTER `redirect` ");
q("ALTER TABLE `clients` ADD `icon` TEXT NULL DEFAULT NULL AFTER `name` ");
q("ALTER TABLE `clients` ADD `uid` INT NOT NULL DEFAULT 0 AFTER `icon` ");
q("ALTER TABLE `tokens` ADD `secret` TEXT NOT NULL AFTER `id` ");
q("ALTER TABLE `tokens` ADD `uid` INT NOT NULL AFTER `scope` ");
}