Browse Source

oauth: db update

pull/2/head
Fabio Comuni 10 years ago
parent
commit
d7d889bcd0
  1. 4
      boot.php
  2. 5
      database.sql
  3. 9
      update.php

4
boot.php

@ -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' );

5
database.sql

@ -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;

9
update.php

@ -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` ");
}

Loading…
Cancel
Save