|
From: Lo?c C. <lo...@us...> - 2001-12-04 20:01:07
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/install/database
In directory usw-pr-cvs1:/tmp/cvs-serv14795/chat/install/database
Modified Files:
mysql.sql pgsql.sql
Log Message:
Begin right levels improvement
Index: mysql.sql
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/install/database/mysql.sql,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** mysql.sql 2001/11/29 22:00:56 1.12
--- mysql.sql 2001/12/04 20:01:04 1.13
***************
*** 60,73 ****
ip varchar(16) NOT NULL DEFAULT '' ,
gender tinyint(1) unsigned NOT NULL DEFAULT '0' ,
PRIMARY KEY (username),
INDEX idx1 (reg_time)
);
! INSERT INTO pmc_reg_users VALUES('admin', '', 'admin', '', '', '', '', '', 0, '', '', '');
#
# Table structure for table 'pmc_rights'
! # right_level is : 10 for the administrator,
! # 5 for a moderator
#
--- 60,79 ----
ip varchar(16) NOT NULL DEFAULT '' ,
gender tinyint(1) unsigned NOT NULL DEFAULT '0' ,
+ log_times smallint(3) unsigned NOT NULL DEFAULT '0' ,
PRIMARY KEY (username),
INDEX idx1 (reg_time)
);
! INSERT INTO pmc_reg_users VALUES('owner', '', 'owner', '', '', '', '', '', 0, '', '', '', 0);
#
# Table structure for table 'pmc_rights'
! # default right_levels are : 9 = owner,
! # 8,7 = administrators,
! # 6 = super-moderators,
! # 5,4,3 = moderators,
! # 2 = experienced user,
! # 1 = registered user,
! # 0 = visitor
#
***************
*** 76,84 ****
username varchar(30) NOT NULL DEFAULT '' ,
room varchar(30) NOT NULL DEFAULT '' ,
! right_level tinyint(2) unsigned NOT NULL DEFAULT '5' ,
PRIMARY KEY (username, room),
INDEX idx1 (room)
);
! INSERT INTO pmc_rights VALUES('admin', '', 10);
--- 82,90 ----
username varchar(30) NOT NULL DEFAULT '' ,
room varchar(30) NOT NULL DEFAULT '' ,
! right_level tinyint(1) unsigned NOT NULL DEFAULT '5' ,
PRIMARY KEY (username, room),
INDEX idx1 (room)
);
! INSERT INTO pmc_rights VALUES('owner', '', 9);
***************
*** 93,96 ****
--- 99,104 ----
last_user_modif int(11) unsigned NOT NULL DEFAULT '0' ,
PRIMARY KEY (room_name)
+ # INDEX idx1 (room_type) ,
+ # INDEX idx2 (last_user_modify)
);
***************
*** 122,126 ****
username varchar(30) NOT NULL DEFAULT '' ,
latin1 tinyint(1) unsigned NOT NULL DEFAULT '0' ,
! status char(2) NOT NULL DEFAULT '0' ,
ip varchar(16) NOT NULL DEFAULT '' ,
away tinyint(1) unsigned NOT NULL DEFAULT '0' ,
--- 130,134 ----
username varchar(30) NOT NULL DEFAULT '' ,
latin1 tinyint(1) unsigned NOT NULL DEFAULT '0' ,
! status char(1) NOT NULL DEFAULT '0' ,
ip varchar(16) NOT NULL DEFAULT '' ,
away tinyint(1) unsigned NOT NULL DEFAULT '0' ,
***************
*** 128,130 ****
--- 136,139 ----
INDEX idx1 (u_time, status),
INDEX idx2 (session_id)
+ # INDEX idx3 (room)
);
Index: pgsql.sql
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/install/database/pgsql.sql,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** pgsql.sql 2001/11/29 22:00:56 1.9
--- pgsql.sql 2001/12/04 20:01:04 1.10
***************
*** 3,7 ****
# -----------------------------------------
#
! # Please note that this model is a bit theorical: we don't test it yet.
# If you face some problems with it or have some suggestions to improve it
# please send us an e-mail.
--- 3,7 ----
# -----------------------------------------
#
! # Please note that this model is a bit theorical: we can't fully test it yet.
# If you face some problems with it or have some suggestions to improve it
# please send us an e-mail.
***************
*** 62,75 ****
ip varchar(16) NOT NULL DEFAULT '' ,
gender int2 NOT NULL DEFAULT '0' ,
PRIMARY KEY (username)
);
CREATE INDEX idx1 ON pmc_reg_users (reg_time);
! INSERT INTO pmc_reg_users VALUES('admin', '', 'admin', '', '', '', '', '', 0, '', '', '');
#
# Table structure for table 'pmc_rights'
! # right_level is : 10 for the administrator,
! # 5 for a moderator
#
--- 62,81 ----
ip varchar(16) NOT NULL DEFAULT '' ,
gender int2 NOT NULL DEFAULT '0' ,
+ log_times int2 unsigned NOT NULL DEFAULT '0' ,
PRIMARY KEY (username)
);
CREATE INDEX idx1 ON pmc_reg_users (reg_time);
! INSERT INTO pmc_reg_users VALUES('owner', '', 'owner', '', '', '', '', '', 0, '', '', '', 0);
#
# Table structure for table 'pmc_rights'
! # default right_levels are : 9 = owner,
! # 8,7 = administrators,
! # 6 = super-moderators,
! # 5,4,3 = moderators,
! # 2 = experienced user,
! # 1 = registered user,
! # 0 = visitor
#
***************
*** 81,85 ****
);
CREATE INDEX idx1 ON pmc_rights (room);
! INSERT INTO pmc_rights VALUES('admin', '', 10);
--- 87,91 ----
);
CREATE INDEX idx1 ON pmc_rights (room);
! INSERT INTO pmc_rights VALUES('owner', '', 9);
***************
*** 94,97 ****
--- 100,105 ----
PRIMARY KEY (room_name)
);
+ # CREATE INDEX idx1 ON pmc_rooms (room_type):
+ # CREATE INDEX idx2 ON pmc_rooms (last_user_modify);
***************
*** 120,124 ****
username varchar(30) NOT NULL DEFAULT '' ,
latin1 int2 NOT NULL DEFAULT '0' ,
! status char(2) NOT NULL DEFAULT '0' ,
ip varchar(16) NOT NULL DEFAULT '' ,
away int2 NOT NULL DEFAULT '0' ,
--- 128,132 ----
username varchar(30) NOT NULL DEFAULT '' ,
latin1 int2 NOT NULL DEFAULT '0' ,
! status char(1) NOT NULL DEFAULT '0' ,
ip varchar(16) NOT NULL DEFAULT '' ,
away int2 NOT NULL DEFAULT '0' ,
***************
*** 127,128 ****
--- 135,138 ----
CREATE INDEX idx1 ON pmc_users (u_time, status);
CREATE INDEX idx2 ON pmc_users (session_id);
+ # CREATE INDEX idx3 ON pmc_users (room);
+
|