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