Просмотр исходного кода

[svn r17780] Added api_service field in user_api_key table to allow for external API keys to be stored in Dokeos. This field is set to 'dokeos' by default (for accessing dokeos from other services) but could be set to 'linkedin' or 'picasa' or 'hi5' to access these services through Dokeos plugins.

Yannick Warnier 16 лет назад
Родитель
Сommit
8a84dda172
2 измененных файлов с 2 добавлено и 1 удалено
  1. 1 0
      main/install/dokeos_main.sql
  2. 1 1
      main/install/migrate-db-1.8.5-1.8.6-pre.sql

+ 1 - 0
main/install/dokeos_main.sql

@@ -1232,6 +1232,7 @@ CREATE TABLE user_api_key (
     id int unsigned NOT NULL auto_increment,
     user_id int unsigned NOT NULL,
     api_key char(32) NOT NULL,
+    api_service char(10) NOT NULL default 'dokeos',
     PRIMARY KEY (id)
 );
 ALTER TABLE user_api_key ADD INDEX idx_user_api_keys_user (user_id);

+ 1 - 1
main/install/migrate-db-1.8.5-1.8.6-pre.sql

@@ -68,7 +68,7 @@ ALTER TABLE user_friend ADD INDEX idx_user_friend_user(user_id);
 ALTER TABLE user_friend ADD INDEX idx_user_friend_friend_user(friend_user_id);
 ALTER TABLE user_friend ADD INDEX idx_user_friend_user_friend_user(user_id,friend_user_id);
 CREATE TABLE user_friend_relation_type(id int unsigned not null auto_increment,title char(20),PRIMARY KEY(id));
-CREATE TABLE user_api_key (id int unsigned NOT NULL auto_increment, user_id int unsigned NOT NULL, api_key char(32) NOT NULL, PRIMARY KEY (id));
+CREATE TABLE user_api_key (id int unsigned NOT NULL auto_increment, user_id int unsigned NOT NULL, api_key char(32) NOT NULL, api_service char(10) NOT NULL default 'dokeos', PRIMARY KEY (id));
 ALTER TABLE user_api_key ADD INDEX idx_user_api_keys_user (user_id);
  
 -- xxSTATSxx