aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2011-11-07 17:48:14 +0100
committerFabio Comuni <fabrix.xm@gmail.com>2011-11-07 17:48:14 +0100
commitd7d889bcd09d4e92e0ded85b6c5f94ef18cc9a75 (patch)
treefd9366ab98ae710137f2edaccbf3147cf47ee523
parent00c342e13d833fd215e5dc03a508e1abe660fe21 (diff)
downloadvolse-hubzilla-d7d889bcd09d4e92e0ded85b6c5f94ef18cc9a75.tar.gz
volse-hubzilla-d7d889bcd09d4e92e0ded85b6c5f94ef18cc9a75.tar.bz2
volse-hubzilla-d7d889bcd09d4e92e0ded85b6c5f94ef18cc9a75.zip
oauth: db update
-rw-r--r--boot.php4
-rw-r--r--database.sql5
-rw-r--r--update.php9
3 files changed, 15 insertions, 3 deletions
diff --git a/boot.php b/boot.php
index cde5c195c..57edcbeaa 100644
--- a/boot.php
+++ b/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' );
diff --git a/database.sql b/database.sql
index 3d11ff4b7..58b81b0ac 100644
--- a/database.sql
+++ b/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;
diff --git a/update.php b/update.php
index 67017fa03..511362a6d 100644
--- a/update.php
+++ b/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` ");
+}