X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/blobdiff_plain/c2cbb1ddd0b314e2542a7a1e6c0e17ade334fe19..200545fb5b96f63266e1b27195edd02217592671:/db/schema.sql

diff --git a/db/schema.sql b/db/schema.sql
index 5a5ed49a..5760d4ae 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -4,7 +4,7 @@ create table users
 	users_id	INTEGER		DEFAULT 0	NOT NULL,
 	unix_uid	SMALLINT 	DEFAULT 0	NOT NULL,
 	shell		VARCHAR(32)	DEFAULT CHR(0)	NOT NULL,
-	winconsoleshell VARCHAR(32)	DEFAULT CHR(0)	NOT NULL,
+	winconsoleshell VARCHAR(32)	DEFAULT 'cmd'	NOT NULL,
 	last		VARCHAR(30) 	DEFAULT CHR(0)	NOT NULL,
 	first		VARCHAR(30) 	DEFAULT CHR(0)	NOT NULL,
 	middle		VARCHAR(30) 	DEFAULT CHR(0)	NOT NULL,
@@ -30,6 +30,7 @@ create table users
 	pop_id		INTEGER		DEFAULT 0	NOT NULL,
 	imap_id		INTEGER		DEFAULT 0	NOT NULL,
 	box_id		INTEGER		DEFAULT 0	NOT NULL,
+	exchange_id	INTEGER		DEFAULT 0	NOT NULL,
 	pmodtime	DATE    	DEFAULT SYSDATE	NOT NULL,
 	pmodby		INTEGER		DEFAULT 0	NOT NULL,
 	pmodwith	VARCHAR(8) 	DEFAULT CHR(0)	NOT NULL,
@@ -44,8 +45,16 @@ create table users
 	sigwho       	INTEGER		DEFAULT 0	NOT NULL,
 	signature    	VARCHAR(68)	DEFAULT CHR(0)	NOT NULL,
 	secure       	INTEGER		DEFAULT 0	NOT NULL,       
+	pin		VARCHAR(10)	DEFAULT CHR(0)	NOT NULL,
 	reservations	VARCHAR(10)	DEFAULT CHR(0)	NOT NULL,
-	flag         	INTEGER		DEFAULT 0	NOT NULL
+	flag         	INTEGER		DEFAULT 0	NOT NULL,
+	created		DATE		DEFAULT SYSDATE	NOT NULL,
+	creator		INTEGER		DEFAULT 0	NOT NULL,
+	winhomedir	VARCHAR(260)	DEFAULT '[DFS]' NOT NULL,
+	winprofiledir	VARCHAR(260)	DEFAULT '[DFS]' NOT NULL,
+	sponsor_type	VARCHAR(8) 	DEFAULT 'NONE'	NOT NULL,
+	sponsor_id	INTEGER		DEFAULT 0	NOT NULL,
+	expiration	VARCHAR(24)	DEFAULT CHR(0)	NOT NULL
 );
 
 create table krbmap
@@ -62,8 +71,9 @@ create table machine
 	model		VARCHAR(24) 	DEFAULT CHR(0)	NOT NULL,
 	os		VARCHAR(16) 	DEFAULT CHR(0)	NOT NULL,
 	location	VARCHAR(16) 	DEFAULT CHR(0)	NOT NULL,
-	contact		VARCHAR(32) 	DEFAULT CHR(0)	NOT NULL,
-	billing_contact	VARCHAR(32)	DEFAULT CHR(0)	NOT NULL,
+	contact		VARCHAR(255) 	DEFAULT CHR(0)	NOT NULL,
+	billing_contact	VARCHAR(255)	DEFAULT CHR(0)	NOT NULL,
+	account_number	VARCHAR(10)	DEFAULT CHR(0)	NOT NULL,	
 	use		INTEGER		DEFAULT 0	NOT NULL,
 	status		INTEGER		DEFAULT 0	NOT NULL,
 	statuschange	DATE    	DEFAULT SYSDATE	NOT NULL,
@@ -93,6 +103,9 @@ create table subnet
 	name		VARCHAR(16) 	DEFAULT CHR(0)	NOT NULL,
 	snet_id		INTEGER		DEFAULT 0	NOT NULL,
 	description	VARCHAR(48) 	DEFAULT CHR(0)	NOT NULL,
+	status		INTEGER		DEFAULT 0	NOT NULL,
+	contact		VARCHAR(255)	DEFAULT CHR(0)	NOT NULL,
+	account_number	VARCHAR(10)	DEFAULT CHR(0)	NOT NULL,
 	saddr		INTEGER		DEFAULT 0	NOT NULL,
 	mask		INTEGER		DEFAULT 0	NOT NULL,
 	low		INTEGER		DEFAULT 0	NOT NULL,
@@ -131,7 +144,7 @@ create table svc
 
 create table list
 (
-	name		VARCHAR(32) 	DEFAULT CHR(0)	NOT NULL,
+	name		VARCHAR(56) 	DEFAULT CHR(0)	NOT NULL,
 	list_id		INTEGER		DEFAULT 0	NOT NULL,
 	active		INTEGER 	DEFAULT 0	NOT NULL,
 	publicflg	INTEGER 	DEFAULT 0	NOT NULL,
@@ -140,6 +153,8 @@ create table list
 	grouplist	INTEGER 	DEFAULT 0	NOT NULL,
 	gid		SMALLINT 	DEFAULT 0	NOT NULL,
 	nfsgroup	INTEGER		DEFAULT 0	NOT NULL,	
+	mailman		INTEGER		DEFAULT 0	NOT NULL,
+	mailman_id	INTEGER		DEFAULT 0	NOT NULL,
 	description	VARCHAR(255) 	DEFAULT CHR(0)	NOT NULL,
 	acl_type	VARCHAR(8) 	DEFAULT CHR(0)	NOT NULL,
 	acl_id		INTEGER		DEFAULT 0	NOT NULL,
@@ -314,7 +329,7 @@ create table printers
 (
 	name		VARCHAR(16) 	DEFAULT CHR(0)	NOT NULL,
 	type		VARCHAR(8)	DEFAULT CHR(0)	NOT NULL,
-	hwtype		VARCHAR(16)	DEFAULT CHR(0)	NOT NULL,
+	hwtype		VARCHAR(64)	DEFAULT CHR(0)	NOT NULL,
 	duplexname	VARCHAR(16) 	DEFAULT CHR(0)	NOT NULL,
 	mach_id		INTEGER		DEFAULT 0	NOT NULL,
 	loghost		INTEGER		DEFAULT 0	NOT NULL,
@@ -382,24 +397,12 @@ create table incremental
 	service		VARCHAR(16) 	DEFAULT CHR(0)	NOT NULL
 );
 
-create table usersids
-(
-	users_id	INTEGER		DEFAULT 0	NOT NULL,
-	sid		VARCHAR(64)	DEFAULT CHR(0)	NOT NULL,
-	created		DATE		DEFAULT SYSDATE	NOT NULL
-);
-
-create table listsids
-(
-	list_id		INTEGER		DEFAULT 0	NOT NULL,
-	sid		VARCHAR(64)	DEFAULT CHR(0)	NOT NULL,
-	created		DATE		DEFAULT SYSDATE	NOT NULL
-);
-
 create table containers
 (
 	name		VARCHAR(64) 	DEFAULT CHR(0)	NOT NULL,
 	cnt_id		INTEGER		DEFAULT 0	NOT NULL,
+	list_id		INTEGER		DEFAULT 0	NOT NULL,
+	publicflg	INTEGER		DEFAULT 0	NOT NULL,
 	description	VARCHAR(255) 	DEFAULT CHR(0)	NOT NULL,
 	location	VARCHAR(64) 	DEFAULT CHR(0)	NOT NULL,
 	contact		VARCHAR(32) 	DEFAULT CHR(0)	NOT NULL,
@@ -417,3 +420,64 @@ create table mcntmap
 	mach_id		INTEGER		DEFAULT 0	NOT NULL,
 	cnt_id		INTEGER		DEFAULT 0	NOT NULL
 );
+
+create table accountnumbers
+(
+	account_number	VARCHAR(10)	DEFAULT CHR(0)	NOT NULL
+);
+
+create table userhistory
+(
+	login		VARCHAR(8) 	DEFAULT CHR(0)	NOT NULL,
+	users_id	INTEGER		DEFAULT 0	NOT NULL,
+	unix_uid	SMALLINT 	DEFAULT 0	NOT NULL,
+	shell		VARCHAR(32)	DEFAULT CHR(0)	NOT NULL,
+	winconsoleshell VARCHAR(32)	DEFAULT 'cmd'	NOT NULL,
+	last		VARCHAR(30) 	DEFAULT CHR(0)	NOT NULL,
+	first		VARCHAR(30) 	DEFAULT CHR(0)	NOT NULL,
+	middle		VARCHAR(30) 	DEFAULT CHR(0)	NOT NULL,
+	status		SMALLINT 	DEFAULT 0	NOT NULL,
+	clearid		VARCHAR(16) 	DEFAULT CHR(0)	NOT NULL,
+	type		VARCHAR(8) 	DEFAULT CHR(0)	NOT NULL,
+	comments        INTEGER		DEFAULT 0	NOT NULL,
+	modtime		DATE    	DEFAULT SYSDATE	NOT NULL,
+	modby		INTEGER		DEFAULT 0	NOT NULL,
+	modwith		VARCHAR(8) 	DEFAULT CHR(0)	NOT NULL,
+	fullname	VARCHAR(92) 	DEFAULT CHR(0)	NOT NULL,
+	nickname	VARCHAR(16) 	DEFAULT CHR(0)	NOT NULL,
+	home_addr	VARCHAR(82) 	DEFAULT CHR(0)	NOT NULL,
+	home_phone	VARCHAR(24) 	DEFAULT CHR(0)	NOT NULL,
+	office_addr	VARCHAR(16) 	DEFAULT CHR(0)	NOT NULL,
+	office_phone	VARCHAR(24) 	DEFAULT CHR(0)	NOT NULL,
+	department	VARCHAR(50) 	DEFAULT CHR(0)	NOT NULL,
+	affiliation	VARCHAR(50) 	DEFAULT CHR(0)	NOT NULL,
+	fmodtime	DATE    	DEFAULT SYSDATE	NOT NULL,
+	fmodby		INTEGER		DEFAULT 0	NOT NULL,
+	fmodwith	VARCHAR(8) 	DEFAULT CHR(0)	NOT NULL,
+	potype		VARCHAR(8) 	DEFAULT CHR(0)	NOT NULL,
+	pop_id		INTEGER		DEFAULT 0	NOT NULL,
+	imap_id		INTEGER		DEFAULT 0	NOT NULL,
+	box_id		INTEGER		DEFAULT 0	NOT NULL,
+	pmodtime	DATE    	DEFAULT SYSDATE	NOT NULL,
+	pmodby		INTEGER		DEFAULT 0	NOT NULL,
+	pmodwith	VARCHAR(8) 	DEFAULT CHR(0)	NOT NULL,
+	xname           VARCHAR(30)	DEFAULT CHR(0)	NOT NULL,
+	xdept        	VARCHAR(50)	DEFAULT CHR(0)	NOT NULL,
+	xtitle       	VARCHAR(50)	DEFAULT CHR(0)	NOT NULL,
+	xaddress     	VARCHAR(82)	DEFAULT CHR(0)	NOT NULL,
+	xphone1      	VARCHAR(24)	DEFAULT CHR(0)	NOT NULL,
+	xphone2      	VARCHAR(24)	DEFAULT CHR(0)	NOT NULL,
+	xmodtime     	DATE         	DEFAULT SYSDATE	NOT NULL,
+	sigdate      	INTEGER		DEFAULT 0	NOT NULL,
+	sigwho       	INTEGER		DEFAULT 0	NOT NULL,
+	signature    	VARCHAR(68)	DEFAULT CHR(0)	NOT NULL,
+	secure       	INTEGER		DEFAULT 0	NOT NULL,       
+	pin		VARCHAR(10)	DEFAULT CHR(0)	NOT NULL,
+	reservations	VARCHAR(10)	DEFAULT CHR(0)	NOT NULL,
+	flag         	INTEGER		DEFAULT 0	NOT NULL,
+	created		DATE		DEFAULT SYSDATE	NOT NULL,
+	creator		INTEGER		DEFAULT 0	NOT NULL,
+	winhomedir	VARCHAR(260)	DEFAULT '[DFS]' NOT NULL,
+	winprofiledir	VARCHAR(260)	DEFAULT '[DFS]' NOT NULL,
+	purged		DATE		DEFAULT SYSDATE NOT NULL
+);
