Some db optimization added.
This commit is contained in:
parent
5a31ad37ed
commit
df10eaab66
|
@ -23,7 +23,7 @@
|
|||
|
||||
|
||||
Author : $Author: tomas $
|
||||
Version : $Revision: 1.5 $
|
||||
Version : $Revision: 1.6 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/alib/var/alib.php,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -37,7 +37,7 @@ define('ALIBERR_NOTEXISTS', 31);
|
|||
* authentication/authorization class
|
||||
*
|
||||
* @author $Author: tomas $
|
||||
* @version $Revision: 1.5 $
|
||||
* @version $Revision: 1.6 $
|
||||
* @see Subjects
|
||||
* @see GreenBox
|
||||
*/
|
||||
|
@ -487,8 +487,8 @@ class Alib extends Subjects{
|
|||
{
|
||||
parent::install();
|
||||
$this->dbc->query("CREATE TABLE {$this->permTable} (
|
||||
permid int not null,
|
||||
subj int,
|
||||
permid int not null PRIMARY KEY,
|
||||
subj int REFERENCES {$this->subjTable} ON DELETE CASCADE,
|
||||
action varchar(20),
|
||||
obj int,
|
||||
type char(1)
|
||||
|
@ -500,8 +500,8 @@ class Alib extends Subjects{
|
|||
$this->dbc->createSequence("{$this->permTable}_id_seq");
|
||||
|
||||
$this->dbc->query("CREATE TABLE {$this->sessTable} (
|
||||
sessid char(32) not null,
|
||||
userid int,
|
||||
sessid char(32) not null PRIMARY KEY,
|
||||
userid int REFERENCES {$this->subjTable} ON DELETE CASCADE,
|
||||
login varchar(255),
|
||||
ts timestamp
|
||||
)");
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
|
||||
Author : $Author: tomas $
|
||||
Version : $Revision: 1.2 $
|
||||
Version : $Revision: 1.3 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/alib/var/class.php,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -35,7 +35,7 @@ require_once "mtree.php";
|
|||
* class for 'object classes' handling - i.e. groups of object in tree
|
||||
*
|
||||
* @author $Author: tomas $
|
||||
* @version $Revision: 1.2 $
|
||||
* @version $Revision: 1.3 $
|
||||
* @see Mtree
|
||||
* @see Subj
|
||||
*/
|
||||
|
@ -293,7 +293,7 @@ class ObjClasses extends Mtree{
|
|||
{
|
||||
parent::install();
|
||||
$this->dbc->query("CREATE TABLE {$this->classTable} (
|
||||
id int not null,
|
||||
id int not null PRIMARY KEY,
|
||||
cname varchar(20)
|
||||
)");
|
||||
$this->dbc->query("CREATE UNIQUE INDEX {$this->classTable}_id_idx
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
|
||||
Author : $Author: tomas $
|
||||
Version : $Revision: 1.2 $
|
||||
Version : $Revision: 1.3 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/alib/var/Attic/mtree.php,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -50,7 +50,7 @@ define('ALIBERR_MTREE', 10);
|
|||
* );
|
||||
* </code></pre>
|
||||
* @author $Author: tomas $
|
||||
* @version $Revision: 1.2 $
|
||||
* @version $Revision: 1.3 $
|
||||
* @see ObjClasses
|
||||
*/
|
||||
class Mtree{
|
||||
|
@ -572,7 +572,7 @@ class Mtree{
|
|||
function install()
|
||||
{
|
||||
$this->dbc->query("CREATE TABLE {$this->treeTable} (
|
||||
id int not null,
|
||||
id int not null PRIMARY KEY,
|
||||
name varchar(255) not null default'',
|
||||
parid int,
|
||||
lft int,
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
|
||||
Author : $Author: tomas $
|
||||
Version : $Revision: 1.2 $
|
||||
Version : $Revision: 1.3 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/alib/var/subj.php,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -39,7 +39,7 @@ define('ALIBERR_BADSMEMB', 21);
|
|||
* (allow adding users to groups or groups to groups)
|
||||
*
|
||||
* @author $Author: tomas $
|
||||
* @version $Revision: 1.2 $
|
||||
* @version $Revision: 1.3 $
|
||||
* @see ObjClasses
|
||||
* @see Alib
|
||||
*/
|
||||
|
@ -503,7 +503,7 @@ class Subjects extends ObjClasses{
|
|||
{
|
||||
parent::install();
|
||||
$this->dbc->query("CREATE TABLE {$this->subjTable} (
|
||||
id int not null,
|
||||
id int not null PRIMARY KEY,
|
||||
login varchar(255) not null default'',
|
||||
pass varchar(255) not null default'',
|
||||
type char(1) not null default 'U'
|
||||
|
@ -515,7 +515,7 @@ class Subjects extends ObjClasses{
|
|||
$this->dbc->createSequence("{$this->subjTable}_id_seq");
|
||||
|
||||
$this->dbc->query("CREATE TABLE {$this->smembTable} (
|
||||
id int not null,
|
||||
id int not null PRIMARY KEY,
|
||||
uid int not null default 0,
|
||||
gid int not null default 0,
|
||||
level int not null default 0,
|
||||
|
|
Loading…
Reference in New Issue