[svn r17869] logic changes-added table messages_invitation - (partial FS#3471)

skala
Isaac Flores 16 years ago
parent baf397e104
commit f5ccdd67d8
  1. 19
      main/install/dokeos_main.sql
  2. 5
      main/install/migrate-db-1.8.5-1.8.6-pre.sql

@ -1235,4 +1235,21 @@ CREATE TABLE user_api_key (
api_service char(10) NOT NULL default 'dokeos', api_service char(10) NOT NULL default 'dokeos',
PRIMARY KEY (id) PRIMARY KEY (id)
); );
ALTER TABLE user_api_key ADD INDEX idx_user_api_keys_user (user_id); ALTER TABLE user_api_key ADD INDEX idx_user_api_keys_user (user_id);
--
-- Table structure for table messages_invitation
--
CREATE TABLE messages_invitation(
id bigint unsigned not null auto_increment,
user_sender_id int unsigned not null,
user_receiver_id int unsigned not null,
msg_status tinyint not null default 0, -- 0 read, 1 unread, 5 pending invitation, 6 accepted invitation, 7 invitacion denegada
send_date int,
title varchar(255) not null,
content text not null,
PRIMARY KEY(id)
);
ALTER TABLE messages_invitation ADD INDEX idx_messages_invitation_user_sender(user_sender_id);
ALTER TABLE messages_invitation ADD INDEX idx_messages_invitation_user_receiver(user_receiver_id);
ALTER TABLE messages_invitation ADD INDEX idx_messages_invitation_user_sender_user_receiver(user_sender_id,user_receiver_id);
ALTER TABLE messages_invitation ADD INDEX idx_messages_invitation_msg_status(msg_status);

@ -70,6 +70,11 @@ ALTER TABLE user_friend ADD INDEX idx_user_friend_user_friend_user(user_id,frien
CREATE TABLE user_friend_relation_type(id int unsigned not null auto_increment,title char(20),PRIMARY KEY(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, api_service char(10) NOT NULL default 'dokeos', 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); ALTER TABLE user_api_key ADD INDEX idx_user_api_keys_user (user_id);
CREATE TABLE messages_invitation(id bigint unsigned not null auto_increment,user_sender_id int unsigned not null,user_receiver_id int unsigned not null,msg_status tinyint not null default 0,send_date int,title varchar(255) not null,content text not null,primary key(id));
ALTER TABLE messages_invitation ADD INDEX idx_messages_invitation_user_sender(user_sender_id);
ALTER TABLE messages_invitation ADD INDEX idx_messages_invitation_user_receiver(user_receiver_id);
ALTER TABLE messages_invitation ADD INDEX idx_messages_invitation_user_sender_user_receiver(user_sender_id,user_receiver_id);
ALTER TABLE messages_invitation ADD INDEX idx_messages_invitation_msg_status(msg_status);
UPDATE settings_current SET access_url_changeable = 1 WHERE variable='Institution'; UPDATE settings_current SET access_url_changeable = 1 WHERE variable='Institution';
UPDATE settings_current SET access_url_changeable = 1 WHERE variable='InstitutionUrl'; UPDATE settings_current SET access_url_changeable = 1 WHERE variable='InstitutionUrl';

Loading…
Cancel
Save