Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r300 - trunk/current/db: mysql pysqlite

Project highlights: Stable Version: 1.6.1, Development Version: 1.7.6

current
Discussion topic

Back to topic list

svn commit: r300 - trunk/current/db: mysql pysqlite

Reply

Author jjneely
Full name Jack Neely
Date 2006-10-07 15:40:39 PDT
Message Author: jjneely
Date: 2006-10-07 15:40:38-0700
New Revision: 300

Modified:
   trunk/current/db/mys​ql/schema.py
   trunk/current/db/pys​qlite/schema.py

Log:
Schema changes to add basic support for OUs. This includes tying users
and client profiles to a specific ou.


Modified: trunk/current/db/mys​ql/schema.py
Url: http://current.tigri​s.org/source/browse/​current/trunk/curren​t/db/mysql/schema.py​?view=diff&rev=3​00&p1=trunk/curr​ent/db/mysql/schema.​py&p2=trunk/curr​ent/db/mysql/schema.​py&r1=299&r2​=300
====================​====================​====================​==================
--- trunk/current/db/mys​ql/schema.py (original)
+++ trunk/current/db/mys​ql/schema.py 2006-10-07 15:40:38-0700
@@ -103,6 +103,7 @@
 create table PROFILE (
     profile_id INTEGER PRIMARY KEY auto_increment,
     user_id int not null,
+ ou_id int not null,
     architecture varchar(64) not null,
     cannon_arch varchar(32) not null,
     os_release varchar(32) not null,
@@ -162,7 +163,8 @@
     contact_fax boolean,
     contact_mail boolean,
     contact_newsletter boolean,
- contact_phone boolean
+ contact_phone boolean,
+ ou_id int not null
 ) Type=InnoDB;
 
 drop table if exists HARDWARE;
@@ -197,4 +199,18 @@
 
     index(profile_id)
 ) Type=InnoDB;
+
+drop table if exists OU;
+create table OU (
+ ou_id INTEGER PRIMARY KEY auto_increment,
+ label varchar(64) not null,
+ description varchar(256),
+ lft int not null,
+ rgt int not null,
+
+ index(label),
+ index(lft),
+ index(rgt)
+) Type=InnoDB;
+insert into OU values ("", "Root", 0, 1);
 """

Modified: trunk/current/db/pys​qlite/schema.py
Url: http://current.tigri​s.org/source/browse/​current/trunk/curren​t/db/pysqlite/schema​.py?view=diff&re​v=300&p1=trunk/c​urrent/db/pysqlite/s​chema.py&p2=trun​k/current/db/pysqlit​e/schema.py&r1=2​99&r2=300
====================​====================​====================​==================
--- trunk/current/db/pys​qlite/schema.py (original)
+++ trunk/current/db/pys​qlite/schema.py 2006-10-07 15:40:38-0700
@@ -81,7 +81,8 @@
 
 create table PROFILE (
     profile_id INTEGER PRIMARY KEY,
- user_id int not null,
+ user_id int not null,
+ ou_id int not null,
     architecture varchar(64) not null,
     cannon_arch varchar(32) not null,
     os_release varchar(32) not null,
@@ -121,7 +122,7 @@
     company varchar(32),
     position varchar(32),
     title varchar(32),
- first_name varchar(32) ,
+ first_name varchar(32),
     last_name varchar(32),
     address1 varchar(32),
     address2 varchar(32),
@@ -135,7 +136,8 @@
     contact_fax boolean,
     contact_mail boolean,
     contact_newsletter boolean,
- contact_phone boolean
+ contact_phone boolean,
+ ou_id int not null
 );
 
 create table HARDWARE (
@@ -165,4 +167,13 @@
 );
 create index STATUS_PROFILE_IDX on STATUS(profile_id);
 
+create table OU (
+ ou_id INTEGER PRIMARY KEY auto_increment,
+ label varchar(64) not null,
+ description varchar(256),
+ lft int not null,
+ rgt int not null,
+);
+create index OU_LFT_IDX on OU(lft);
+create index OU_RGT_IDX on OU(rgt);
 """

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r300 - trunk/current/db: mysql pysqlite jjneely Jack Neely 2006-10-07 15:40:39 PDT
Messages per page: