]> andersk Git - moira.git/commitdiff
Oracle changes
authordanw <danw>
Mon, 20 Jan 1997 18:16:45 +0000 (18:16 +0000)
committerdanw <danw>
Mon, 20 Jan 1997 18:16:45 +0000 (18:16 +0000)
(sqlplus prefers input files to have names ending in `.sql')
newdb, newmoira, etc were out of date: New versions should be done
before the public release.

db/Imakefile
db/README [deleted file]
db/db2tbls.awk [deleted file]
db/dbopt [deleted file]
db/dbopt.sql [new file with mode: 0644]
db/newdb [deleted file]
db/newmoira.dc [deleted file]
db/schema [deleted file]
db/schema.sql [new file with mode: 0644]
db/unschema.sql [new file with mode: 0644]

index 65e111e20e6f4415ef1f91783b640c787aecc4ec..40496123cbb769baaa71e6a90a82085e1b980fa1 100644 (file)
@@ -8,19 +8,9 @@
 # Imakefile for db directory.
 #
 
-SRCS=  newmoira.c
 SRCDIR=${SRCTOP}/db
-CODE= newmoira.dc Imakefile db2tbls.awk schema optimizations
-OBJS=  newmoira.o tables.o
-INCLUDE= -I$(BUILDTOP)/include
-sqlrule()
-
-program(newmoira, ${OBJS},${MR_LIBDEP} ${GDB_LIBDEP}, ../server/queries2.o ${CLIBS} ${SQL_LIB}, ${PROGDIR})
-sqlfile(newmoira)
-
-tables.c: schema db2tbls.awk
-       awk -f db2tbls.awk < schema > tables.c
-clean::
-       $(RM) tables.c
+CODE= Imakefile schema.sql unschema.sql dbopt.sql
 
 depend:: ${CODE}
+
+all:
\ No newline at end of file
diff --git a/db/README b/db/README
deleted file mode 100644 (file)
index a80ec54..0000000
--- a/db/README
+++ /dev/null
@@ -1,42 +0,0 @@
-/mit/moiradev/db/README: $Header$
-
-This directory contains stuff necessary to create and initialize a
-Moira database.  Note that some other directories rely on files here
-(notably newdb), and that the newmoira program relies on other files.
-
-STEPS TO CREATE A DATABASE (Ingres-specific instructions):
-
--1.Make sure there is enough disk space on the partition which is to
-   hold the database.  Building the indexes for Athena takes something
-   like 50 Meg of free disk space, *after* the ~100 Meg for the base DB.
-0. If necessary, run "destroydb moira" from the shell. [a few seconds]
-1. Run "createdb moira" from the shell. [a minute or so]
-2. Run the sql commands in src/db/schema to create the tables. [a few seconds]
-3. Run mrrestore. [10-20 hours on a decstation]
-4. If you want any queries to be publically executable, change their
-   capacls entries from list_id 2 to 1.
-5. Run the sql commands in src/db/dbopt to create indices on the data.
-   Any failures are probably due to insufficient disk space.  (Check
-   /ingres/files/errlog.log to make sure.) [ <= 1 hour on a decstation]  
-  
-
-Example:
-
-    createdb moira
-    sql moira
-       \include schema
-       \go
-       \quit
-    /moira/bin/mrrestore moira
-       yes
-       yes
-       <path prefix with trailing '/'>
-       yes
-    sql moira
-       \include dbopt
-       \quit
-
-
-THINGS TO DO:
-
-automate generation of stub procs in newmoira.qc
diff --git a/db/db2tbls.awk b/db/db2tbls.awk
deleted file mode 100644 (file)
index ef15c82..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#      $Source$
-#      $Header$
-#
-#      This converts the file used to originally create the database
-#      into a list of tables.
-
-BEGIN { print "/* This file automatically generated */";
-       print "/* Do not edit */";
-       print "char *tables[] = {";
-}
-
-$1=="CREATE"   { printf "      \"%s\",\n", $3; }
-$1=="create" && $2=="table"    { printf "      \"%s\",\n", $3; }
-$1=="create" && $2!="table"    { printf "      \"%s\",\n", $2; }
-
-END   { print "        0,";
-       print "};"; }
diff --git a/db/dbopt b/db/dbopt
deleted file mode 100644 (file)
index 2a2d329..0000000
--- a/db/dbopt
+++ /dev/null
@@ -1,107 +0,0 @@
-modify users to cbtree unique on users_id;\g
-create index i_usr_login on users (login);\g
-modify i_usr_login to btree;\g
-create index i_usr_name on  users (first, last);\g
-modify i_usr_name to cbtree on first, last;\g
-create index i_usr_last on  users (last, first);\g
-modify i_usr_last to cbtree on last, first;\g
-create index i_usr_uid on  users (uid);\g
-modify i_usr_uid to btree;\g
-create index i_usr_pop on  users (pop_id);\g
-modify i_usr_pop to btree;\g
-create index i_usr_clearid on users (clearid);\g
-modify i_usr_clearid to btree;\g
-;\g
-modify krbmap to btree unique on users_id;\g
-create index i_krb_str on  krbmap (string_id);\g
-modify i_krb_str to btree;\g
-;\g
-modify machine to cbtree unique on mach_id;\g
-create index i_mac_name on  machine (name);\g
-modify i_mac_name to btree;\g
-create index i_mac_addr on machine (address);\g
-modify i_mac_addr to btree;\g
-create index i_mac_loc on machine (location);\g
-modify i_mac_loc to btree;\g
-create index i_mac_snet on machine (snet_id);\g
-modify i_mac_snet to btree;\g
-;\g
-modify hostalias to cbtree unique on name;\g
-create index i_hal_id on hostalias (mach_id);\g
-modify i_hal_id to btree;\g
-;\g
-modify subnet to btree unique on snet_id;\g
-create index i_snt_name on subnet (name);\g
-create index i_snt_saddr on subnet(saddr);\g
-;\g
-modify cluster to cbtree unique on clu_id;\g
-create index i_clu_name on  cluster (name);\g
-modify i_clu_name to btree;\g
-;\g
-modify mcmap to cbtree on clu_id;\g
-create index i_mcm_mach on  mcmap (mach_id);\g
-modify i_mcm_mach to cbtree;\g
-;\g
-modify svc to cbtree on clu_id;\g
-;\g
-modify servers to btree on name;\g
-;\g
-modify serverhosts to btree on service;\g
-create index i_sho_mach on  serverhosts (mach_id);\g
-modify i_sho_mach to cbtree;\g
-;\g
-modify list to cbtree unique on list_id;\g
-create index i_lis_name on  list (name);\g
-modify i_lis_name to cbtree;\g
-create index i_lis_mail on  list (maillist);\g
-create index i_lis_group on  list (grouplist);\g
-create index i_lis_gid on  list (gid);\g
-create index i_lis_acl on list (acl_id);\g
-modify i_lis_gid to btree;\g
-;\g
-modify imembers to cbtree on member_id, member_type;\g
-create index i_imem_list on  imembers (list_id);\g
-modify i_imem_list to hash;\g
-create index i_imem_all on imembers (list_id, member_type, member_id, direct);\g
-;\g
-modify strings to cbtree unique on string_id;\g
-create index i_str_name on  strings (string);\g
-modify i_str_name to hash;\g
-;\g
-modify nfsphys to cbtree unique on nfsphys_id;\g
-create index i_nfs_mach on  nfsphys (mach_id);\g
-modify i_nfs_mach to btree;\g
-;\g
-modify filesys to cbtree unique on filsys_id;\g
-create index i_fil_name on  filesys (label);\g
-modify i_fil_name to cbtree;\g
-create index i_fil_mach on  filesys (mach_id);\g
-modify i_fil_mach to btree;\g
-create index i_fil_phys on  filesys (phys_id);\g
-modify i_fil_phys to cbtree;\g
-create index i_fil_grp on  filesys (owners);\g
-modify i_fil_grp to btree;\g
-create index i_fil_user on  filesys (owner);\g
-modify i_fil_user to btree;\g
-;\g
-modify fsgroup to cbtree on group_id;\g
-create index i_fsg_filsys on  fsgroup (filsys_id);\g
-modify i_fsg_filsys to btree;\g
-;\g
-modify quota to cbtree on entity_id;\g
-create index i_qot_fil on  quota (filsys_id);\g
-modify i_qot_fil to cbtree;\g
-create index i_qot_phys on  quota (phys_id);\g
-modify i_qot_phys to cbtree;\g
-;\g
-modify zephyr to cbtree unique on class;\g
-;\g
-modify hostaccess to cbtree unique on mach_id;\g
-;\g
-modify printcap to cbtree on name;\g
-create index i_pcp_mach on  printcap (mach_id);\g
-modify i_pcp_mach to btree;\g
-;\g
-modify palladium to cbtree on name;\g
-;\g
-modify capacls to cbtree on tag;\g
diff --git a/db/dbopt.sql b/db/dbopt.sql
new file mode 100644 (file)
index 0000000..df88c02
--- /dev/null
@@ -0,0 +1,77 @@
+create unique index i_usr_usid on users (users_id);
+create index i_usr_login on users (login);
+create index i_usr_name on  users (first, last);
+create index i_usr_last on  users (last, first);
+create index i_usr_uid on  users (unix_uid);
+create index i_usr_pop on  users (pop_id);
+create index i_usr_clearid on users (clearid);
+
+create unique index i_krb_usid on krbmap  (users_id);
+create index i_krb_str on  krbmap (string_id);
+
+create unique index i_mac_mid on machine  (mach_id);
+create index i_mac_name on  machine (name);
+create index i_mac_addr on machine (address);
+create index i_mac_loc on machine (location);
+create index i_mac_snet on machine (snet_id);
+
+create unique index i_hal_name on hostalias  (name);
+create index i_hal_id on hostalias (mach_id);
+
+create unique index i_snt_sid on subnet  (snet_id);
+create index i_snt_name on subnet (name);
+create index i_snt_saddr on subnet(saddr);
+
+create unique index i_clu_clid on clusters (clu_id);
+create index i_clu_name on  clusters (name);
+
+create index i_mcm_clid on mcmap (clu_id);
+create index i_mcm_mach on  mcmap (mach_id);
+
+create index i_svc_clid on svc (clu_id);
+
+create index i_srv_name on servers (name);
+
+create index i_sho_srv on serverhosts (service);
+create index i_sho_mach on  serverhosts (mach_id);
+
+create unique index i_lis_lid on list  (list_id);
+create index i_lis_name on  list (name);
+create index i_lis_mail on  list (maillist);
+create index i_lis_group on  list (grouplist);
+create index i_lis_gid on  list (gid);
+create index i_lis_acl on list (acl_id);
+
+create index i_imem_mid on imembers (member_id, member_type);
+create index i_imem_list on  imembers (list_id);
+
+create unique index i_str_sid on strings  (string_id);
+create index i_str_name on  strings (string);
+
+create unique index i_nfs_nid on nfsphys  (nfsphys_id);
+create index i_nfs_mach on  nfsphys (mach_id);
+
+create unique index i_fil_fid on filesys  (filsys_id);
+create index i_fil_name on  filesys (label);
+create index i_fil_mach on  filesys (mach_id);
+create index i_fil_phys on  filesys (phys_id);
+create index i_fil_grp on  filesys (owners);
+create index i_fil_user on  filesys (owner);
+
+create index i_fsg_gid on fsgroup (group_id);
+create index i_fsg_filsys on  fsgroup (filsys_id);
+
+create index i_qot_eid on quota (entity_id);
+create index i_qot_fil on  quota (filsys_id);
+create index i_qot_phys on  quota (phys_id);
+
+create unique index i_zph_class on zephyr  (class);
+
+create unique index i_hac_mid on hostaccess  (mach_id);
+
+create index i_pcp_name on printcap (name);
+create index i_pcp_mach on  printcap (mach_id);
+
+create index i_plad_name on palladium (name);
+
+create index i_cap_tag on capacls (tag);
diff --git a/db/newdb b/db/newdb
deleted file mode 100644 (file)
index 692582f..0000000
--- a/db/newdb
+++ /dev/null
@@ -1,277 +0,0 @@
-create users 
-(
-        login          = c8,
-       users_id        = i4,
-       uid             = i2,
-       shell           = c32,
-       last            = c16,
-       first           = c16,
-       middle          = c16,
-       status          = i2,
-       mit_id          = c13,
-       mit_year        = c8,
-       modtime         = date,
-       modby           = i4,
-       modwith         = c8,
-       fullname        = c32,
-       nickname        = c16,
-       home_addr       = c80,
-       home_phone      = c16,
-       office_addr     = c16,
-       office_phone    = c12,
-       mit_dept        = c12,
-       mit_affil       = c4,
-       fmodtime        = date,
-       fmodby          = i4,
-       fmodwith        = c8,
-       potype          = c8,
-       pop_id          = i4,
-       box_id          = i4,
-       pmodtime        = date,
-       pmodby          = i4,
-       pmodwith        = c8,
-       gid             = i2,
-       uglist_id       = i4,
-       ugdefault       = i1
-)
-create krbmap
-(
-       users_id        = i4,
-       string_id       = i4
-)
-create machine 
-(
-       name            = c32,
-       mach_id         = i4,
-       type            = c8,
-       modtime         = date,
-       modby           = i4,
-       modwith         = c8
-)
-create cluster 
-(
-       name            = c32,
-       clu_id          = i4,
-       desc            = c32,
-       location        = c64,
-       modtime         = date,
-       modby           = i4,
-       modwith         = c8
-)
-create mcmap 
-(
-       mach_id         = i4,
-       clu_id          = i4
-)
-create svc 
-(
-       clu_id          = i4,
-       serv_label      = c16,
-       serv_cluster    = c32
-)
-create list 
-(
-       name            = c32,
-       list_id         = i4,
-       active          = i1,
-       public          = i1,
-       hidden          = i1,
-       maillist        = i1,
-       group           = i1,
-       gid             = i2,
-       desc            = c255,
-       acl_type        = c8,
-       acl_id          = i4,
-       modtime         = date,
-       modby           = i4,
-       modwith         = c8
-)
-create imembers 
-(
-       list_id         = i4,
-       member_type     = c8,
-       member_id       = i4,
-       ref_count       = i2,
-       direct          = i2
-)
-create servers 
-(
-       name            = c16,
-       update_int      = i4,
-       target_file     = c64,
-       script          = c128,
-       dfgen           = i4,
-       dfcheck         = i4,
-       type            = c8,
-       enable          = i1,
-       inprogress      = i1,
-       harderror       = i4,
-       errmsg          = c80,
-       acl_type        = c8,
-       acl_id          = i4,
-       modtime         = date,
-       modby           = i4,
-       modwith         = c8
-)
-create serverhosts 
-(
-       service         = c16,
-       mach_id         = i4,
-       success         = i1,
-       enable          = i1,
-       override        = i1,
-       inprogress      = i1,
-       hosterror       = i4,
-       hosterrmsg      = c80,
-       ltt             = i4,
-       lts             = i4,
-       value1          = i4,
-       value2          = i4,
-       value3          = c32,
-       modtime         = date,
-       modby           = i4,
-       modwith         = c8
-)
-create filesys 
-(
-       filsys_id       = i4,
-       phys_id         = i4,
-       label           = c32,
-       order           = i2,
-       type            = c8,
-       mach_id         = i4,
-       name            = c80,
-       mount           = c32,
-       access          = c1,
-       comments        = c64,
-       owner           = i4,
-       owners          = i4,
-       createflg       = i1,
-       lockertype      = c8,
-       modtime         = date,
-       modby           = i4,
-       modwith         = c8
-)
-create fsgroup
-(
-       group_id        = i4,
-       filsys_id       = i4,
-       key             = c8
-)
-create nfsphys 
-(
-       nfsphys_id      = i4,
-       mach_id         = i4,
-       device          = c16,
-       dir             = c16,
-       status          = i2,
-       allocated       = i4,
-       size            = i4,
-       modtime         = date,
-       modby           = i4,
-       modwith         = c8
-)
-create quota 
-(
-       filsys_id       = i4,
-       type            = c8,
-       entity_id       = i4,
-       phys_id         = i4,
-       quota           = i4,
-       modtime         = date,
-       modby           = i4,
-       modwith         = c8
-)
-create zephyr 
-(
-       class           = c16,
-       xmt_type        = c8,
-       xmt_id          = i4,
-       sub_type        = c8,
-       sub_id          = i4,
-       iws_type        = c8,
-       iws_id          = i4,
-       iui_type        = c8,
-       iui_id          = i4,
-       modtime         = date,
-       modby           = i4,
-       modwith         = c8
-)
-create hostaccess 
-(
-       mach_id         = i4,
-       acl_type        = c8,
-       acl_id          = i4,
-       modtime         = date,
-       modby           = i4,
-       modwith         = c8
-)
-create strings 
-(
-       string_id       = i4,
-       string          = c128
-)
-create services 
-(
-       name            = c16,
-       protocol        = c8,
-       port            = i2,
-       desc            = c64,
-       modtime         = date,
-       modby           = i4,
-       modwith         = c8
-)
-create printcap 
-(
-       name            = c16,
-       mach_id         = i4,
-       dir             = c32,
-       rp              = c16,
-       quotaserver     = i4,
-       auth            = i1,
-       price           = i2,
-       comments        = c64,
-       modtime         = date,
-       modby           = i4,
-       modwith         = c8
-)
-create palladium
-(
-       name            = c32,
-       ident           = i4,
-       mach_id         = i4,
-       modtime         = date,
-       modby           = i4,
-       modwith         = c8
-)
-create capacls 
-(
-       capability      = c32,
-       tag             = c4,
-       list_id         = i4
-)
-create alias 
-(
-       name            = c32,
-       type            = c16,
-       trans           = c128
-)
-create values 
-(
-       name            = c32,
-       value           = i4
-)
-create tblstats 
-(
-       table           = c12,
-       modtime         = date,
-       retrieves       = i4,
-       appends         = i4,
-       updates         = i4,
-       deletes         = i4
-)
-create incremental
-(
-       table           = c16,
-       service         = c16
-)
diff --git a/db/newmoira.dc b/db/newmoira.dc
deleted file mode 100644 (file)
index d047ece..0000000
+++ /dev/null
@@ -1,485 +0,0 @@
-/* $Header$
- *
- * Creates a new sms database
- *
- * Copyright 1988 by the Massachusetts Institute of Technology.
- * For copying and distribution information, please see the file
- * <mit-copyright.h>.
- */
-
-#include <mit-copyright.h>
-#include <stdio.h>
-#include "../server/query.h"
-EXEC SQL INCLUDE sqlca;
-
-extern char *tables[];
-extern struct query Queries2[];
-extern int QueryCount2;
-
-char *values[] = { "users_id", "mach_id", "clu_id", "list_id",
-                  "nfsphys_id", "filsys_id", "strings_id", "dcm_enable",
-                  0 };
-
-struct alias { char *name;
-              char *type;
-              char *trans;
-          } aliases[] = {
-                  {"ace_type", "TYPE", "KERBEROS"},
-                  {"ace_type", "TYPE", "LIST"},
-                  {"ace_type", "TYPE", "NONE"},
-                  {"ace_type", "TYPE", "USER"},
-                  {"alias", "TYPE", "FILESYS"},
-                  {"alias", "TYPE", "PALLADIUM"},
-                  {"alias", "TYPE", "TYPE"},
-                  {"alias", "TYPE", "SERVICE"},
-                  {"alias", "TYPE", "TYPEDATA"},
-                  {"alias", "TYPE", "VALUE"},
-                  {"boolean", "TYPE", "FALSE"},
-                  {"boolean", "TYPE", "DONTCARE"},
-                  {"boolean", "TYPE", "TRUE"},
-                  {"class", "TYPE", "STAFF"},
-                  {"class", "TYPE", "1990"},
-                  {"class", "TYPE", "1991"},
-                  {"class", "TYPE", "1992"},
-                  {"class", "TYPE", "1993"},
-                  {"class", "TYPE", "FACULTY"},
-                  {"class", "TYPE", "G"},
-                  {"class", "TYPE", "GUEST"},
-                  {"class", "TYPE", "TEST"},
-                  {"class", "TYPE", "SYSTEM"},
-                  {"filesys", "TYPE", "ERR"},
-                  {"filesys", "TYPE", "FSGROUP"},
-                  {"filesys", "TYPE", "NFS"},
-                  {"filesys", "TYPE", "RVD"},
-                  {"filesys", "TYPE", "AFS"},
-                  {"fs_access_AFS", "TYPE", "w"},
-                  {"fs_access_AFS", "TYPE", "n"},
-                  {"fs_access_NFS", "TYPE", "r"},
-                  {"fs_access_NFS", "TYPE", "n"},
-                  {"fs_access_NFS", "TYPE", "w"},
-                  {"fs_access_RVD", "TYPE", "r"},
-                  {"fs_access_RVD", "TYPE", "x"},
-                  {"gaus", "TYPE", "LIST"},
-                  {"gaus", "TYPE", "USER"},
-                  {"gaus", "TYPE", "RLIST"},
-                  {"gaus", "TYPE", "RUSER"},
-                  {"lockertype", "TYPE", "COURSE"},
-                  {"lockertype", "TYPE", "HOMEDIR"},
-                  {"lockertype", "TYPE", "OTHER"},
-                  {"lockertype", "TYPE", "PROJECT"},
-                  {"lockertype", "TYPE", "SYSTEM"},
-                  {"mac_type", "TYPE", "MAC"},
-                  {"mac_type", "TYPE", "NEXT"},
-                  {"mac_type", "TYPE", "PMAX"},
-                  {"mac_type", "TYPE", "RT"},
-                  {"mac_type", "TYPE", "VAX"},
-                  {"member", "TYPE", "KERBEROS"},
-                  {"member", "TYPE", "LIST"},
-                  {"member", "TYPE", "STRING"},
-                  {"member", "TYPE", "USER"},
-                  {"pobox", "TYPE", "SMTP"},
-                  {"pobox", "TYPE", "NONE"},
-                  {"pobox", "TYPE", "POP"},
-                  {"quota_type", "TYPE", "USER"},
-                  {"quota_type", "TYPE", "GROUP"},
-                  {"quota_type", "TYPE", "ANY"},
-                  {"rmember", "TYPE", "LIST"},
-                  {"rmember", "TYPE", "STRING"},
-                  {"rmember", "TYPE", "USER"},
-                  {"rmember", "TYPE", "KERBEROS"},
-                  {"rmember", "TYPE", "RLIST"},
-                  {"rmember", "TYPE", "RSTRING"},
-                  {"rmember", "TYPE", "RUSER"},
-                  {"rmember", "TYPE", "RKERBEROS"},
-                  {"service", "TYPE", "REPLICAT"},
-                  {"service", "TYPE", "REPLICATED"},
-                  {"service", "TYPE", "UNIQUE"},
-                  {"slabel", "TYPE", "LPR"},
-                  {"slabel", "TYPE", "KERBEROS"},
-                  {"slabel", "TYPE", "USRLIB"},
-                  {"slabel", "TYPE", "SYSLIB"},
-                  {"slabel", "TYPE", "ZEPHYR"},
-                  {"ANY", "TYPEDATA", "none"},
-                  {"KERBEROS", "TYPEDATA", "string"},
-                  {"GROUP", "TYPEDATA", "list"},
-                  {"LIST", "TYPEDATA", "list"},
-                  {"NONE", "TYPEDATA", "none"},
-                  {"POP", "TYPEDATA", "machine"},
-                  {"RLIST", "TYPEDATA", "list"},
-                  {"RSTRING", "TYPEDATA", "string"},
-                  {"RUSER", "TYPEDATA", "user"},
-                  {"SMTP", "TYPEDATA", "string"},
-                  {"STRING", "TYPEDATA", "string"},
-                  {"USER", "TYPEDATA", "user"},        
-                  0 };
-
-
-int ingres_errno = 0;
-
-main(argc, argv)
-int argc;
-char **argv;
-{
-    EXEC SQL BEGIN DECLARE SECTION;
-    char buffer[256];
-    char *db, *tbl, *value, *user, *query, *trans, *type;
-    int i, list;
-    char stmt_buf[256];
-    EXEC SQL END DECLARE SECTION;
-
-    if (argc == 2)
-      db = argv[1];
-    else
-      db = "sms";
-#ifsql INGRES
-    EXEC SQL CONNECT :db;
-#endsql
-#ifsql INFORMIX
-    EXEC SQL DATABASE db;
-#endsql
-    EXEC SQL WHENEVER SQLERROR CALL ingerr;
-
-    strcpy(buffer, "root");
-    user = buffer;
-    while (buffer[0]) {
-       for (i = 0; tbl = tables[i]; i++) {
-#ifsql INGRES
-           sprintf(stmt_buf,"GRANT ALL PRIVILEGES ON TABLE %s TO %s",tbl,user);
-           EXEC SQL EXECUTE IMMEDIATE :stmt_buf;
-#endsql
-           if (ingres_errno) {
-               printf("Unable to give %s permission to access table %s\n",
-                      user, tbl);
-               exit(1);
-           }
-       }
-       printf("Enter the name of another user to be given direct access to\n");
-       printf("the database, or [RETURN] if none: ");
-       fflush(stdout);
-       gets(user);
-    }
-
-    for (i = 0; tbl = tables[i]; i++) {
-       EXEC SQL INSERT INTO tblstats
-         (table_name, modtime, appends, updates, deletes)
-         VALUES (:tbl, 'now', 0, 0, 0);
-       if (ingres_errno) {
-           printf("Unable to initialize tblstats for %s\n", tbl);
-           EXEC SQL INQUIRE_SQL (:buffer = ERRORTEXT);
-           printf("SQL error: %s\n",buffer);
-           exit(1);
-       }
-    }
-
-    for (i = 0; value = values[i]; i++) {
-       EXEC SQL INSERT INTO numvalues (name, value)
-         VALUES (:value, 1);
-       if (ingres_errno) {
-           printf("Unable to install initial value of %s\n", value);
-           EXEC SQL INQUIRE_SQL (:buffer = ERRORTEXT);
-           printf("SQL error: %s\n",buffer);
-           exit(1);
-       }
-    }
-
-    printf("What is the starting UID to assign: ");
-    fflush(stdout);
-    gets(buffer);
-    i = atoi(buffer);
-    EXEC SQL INSERT INTO numvalues (name, value)
-      VALUES ('uid', :i);
-    if (ingres_errno) {
-       printf("Unable to install value for uid\n");
-       EXEC SQL INQUIRE_SQL (:buffer = ERRORTEXT);
-       printf("SQL error: %s\n",buffer);
-       exit(1);
-    }
-
-    printf("What is the starting GID to assign: ");
-    fflush(stdout);
-    gets(buffer);
-    i = atoi(buffer);
-    EXEC SQL INSERT INTO numvalues (name, value)
-      VALUES ('gid', :i);
-    if (ingres_errno) {
-       printf("Unable to install value for gid\n");
-       EXEC SQL INQUIRE_SQL (:buffer = ERRORTEXT);
-       printf("SQL error: %s\n",buffer);
-       exit(1);
-    }
-
-    printf("What is the default NFS quota to assign: ");
-    fflush(stdout);
-    gets(buffer);
-    i = atoi(buffer);
-    EXEC SQL INSERT INTO numvalues (name, value)
-      VALUES ('def_quota', :i);
-    if (ingres_errno) {
-       printf("Unable to install value for def_quota\n");
-       EXEC SQL INQUIRE_SQL (:buffer = ERRORTEXT);
-       printf("SQL error: %s\n",buffer);       
-       exit(1);
-    }
-
-    /* place holder records */
-    EXEC SQL INSERT INTO users (login, potype, users_id)
-      VALUES ('[nobody]', 'NONE', 0);
-    if (ingres_errno) {
-       printf("Unable to install 0 user\n");
-       EXEC SQL INQUIRE_SQL (:buffer = ERRORTEXT);
-       printf("SQL error: %s\n",buffer);
-       exit(1);
-    }
-    EXEC SQL INSERT INTO machine (name, type)
-      VALUES ('[NONE]', 'NONE');
-    if (ingres_errno) {
-       printf("Unable to install 0 machine\n");
-       EXEC SQL INQUIRE_SQL (:buffer = ERRORTEXT);
-       printf("SQL error: %s\n",buffer);
-       exit(1);
-    }
-    EXEC SQL INSERT INTO subnet (name)
-      VALUES ('NONE');
-    if (ingres_errno) {
-       printf("Unable to install 0 subnet\n");
-       EXEC SQL INQUIRE_SQL (:buffer = ERRORTEXT);
-       printf("SQL error: %s\n",buffer);
-       exit(1);
-    }
-    EXEC SQL INSERT INTO cluster (name)
-      VALUES ('[unassigned]');
-    if (ingres_errno) {
-       printf("Unable to install 0 cluster\n");
-       EXEC SQL INQUIRE_SQL (:buffer = ERRORTEXT);
-       printf("SQL error: %s\n",buffer);
-       exit(1);
-    }
-    EXEC SQL INSERT INTO list (name, acl_type)
-      VALUES ('[none]', 'NONE');
-    if (ingres_errno) {
-       printf("Unable to install 0 list\n");
-       EXEC SQL INQUIRE_SQL (:buffer = ERRORTEXT);
-       printf("SQL error: %s\n",buffer);
-       exit(1);
-    }
-    EXEC SQL INSERT INTO filesys (label, type)
-      VALUES ('[none]', 'NONE');
-    if (ingres_errno) {
-       printf("Unable to install 0 filesys\n");
-       EXEC SQL INQUIRE_SQL (:buffer = ERRORTEXT);
-       printf("SQL error: %s\n",buffer);
-       exit(1);
-    }
-    EXEC SQL INSERT INTO nfsphys (device)
-      VALUES ('/dev/null');
-    if (ingres_errno) {
-       printf("Unable to install 0 nfsphys\n");
-       EXEC SQL INQUIRE_SQL (:buffer = ERRORTEXT);
-       printf("SQL error: %s\n",buffer);
-       exit(1);
-    }
-
-    /* magic for ALL_USERS */
-    EXEC SQL INSERT INTO users (login, users_id, potype)
-      VALUES ('default', 1, 'NONE');
-    if (ingres_errno) {
-       printf("Unable to install default user\n");
-       EXEC SQL INQUIRE_SQL (:buffer = ERRORTEXT);
-       printf("SQL error: %s\n",buffer);
-       exit(1);
-    }
-    EXEC SQL INSERT INTO list (name, list_id, acl_type)
-      VALUES ('default', 1, 'NONE');
-    if (ingres_errno) {
-       printf("Unable to install default list\n");
-       EXEC SQL INQUIRE_SQL (:buffer = ERRORTEXT);
-       printf("SQL error: %s\n",buffer);
-       exit(1);
-    }
-    EXEC SQL INSERT INTO imembers
-      (list_id, member_type, member_id, ref_count, direct)
-      VALUES (1, 'USER', 1, 1, 1);
-    if (ingres_errno) {
-       printf("Unable to install default user on default list\n");
-       EXEC SQL INQUIRE_SQL (:buffer = ERRORTEXT);
-       printf("SQL error: %s\n",buffer);
-       exit(1);
-    }
-
-    /* Privileged users */
-    EXEC SQL INSERT INTO users (login, users_id, potype)
-      VALUES ('root', 2, 'NONE');
-    if (ingres_errno) {
-       printf("Unable to install root user\n");
-       EXEC SQL INQUIRE_SQL (:buffer = ERRORTEXT);
-       printf("SQL error: %s\n",buffer);
-       exit(1);
-    }
-    EXEC SQL INSERT INTO list (name, list_id, acl_type, acl_id)
-      VALUES ('dbadmin', 2, 'LIST', 2);
-    if (ingres_errno) {
-       printf("Unable to install default dbadmin list\n");
-       EXEC SQL INQUIRE_SQL (:buffer = ERRORTEXT);
-       printf("SQL error: %s\n",buffer);
-       exit(1);
-    }
-
-    printf("What is the name of a privileged user: ");
-    fflush(stdout);
-    gets(buffer);
-    user = buffer;
-    EXEC SQL INSERT INTO users (login, users_id, potype)
-      VALUES (:user, 3, 'NONE');
-    if (ingres_errno) {
-       printf("Unable to install user %s\n", buffer);
-       EXEC SQL INQUIRE_SQL (:buffer = ERRORTEXT);
-       printf("SQL error: %s\n",buffer);
-       exit(1);
-    }
-    EXEC SQL INSERT INTO imembers
-      (list_id, member_type, member_id, ref_count, direct)
-      VALUES (2, 'USER', 2, 1, 1);
-    if (ingres_errno) {
-       printf("Unable to put user root on list dbadmin\n");
-       EXEC SQL INQUIRE_SQL (:buffer = ERRORTEXT);
-       printf("SQL error: %s\n",buffer);
-       exit(1);
-    }
-    EXEC SQL INSERT INTO imembers
-      (list_id, member_type, member_id, ref_count, direct)
-      VALUES (2, 'USER', 3, 1, 1);
-    if (ingres_errno) {
-       printf("Unable to put user %s on list dbadmin\n", buffer);
-       EXEC SQL INQUIRE_SQL (:buffer = ERRORTEXT);
-       printf("SQL error: %s\n",buffer);
-       exit(1);
-    }
-
-    /* And the capacls */
-    for (i = 0; i < QueryCount2; i++) {
-       query = Queries2[i].name;
-       value = Queries2[i].shortname;
-       list = 2;
-       if (!strcmp(value, "gali") || !strcmp(value, "glig") ||
-           !strcmp(value, "glim") || !strcmp(value, "gval"))
-         list = 1;
-       EXEC SQL INSERT INTO capacls (capability, tag, list_id)
-         VALUES (:query, :value, :list);
-       if (ingres_errno) {
-           printf("Unable to install query ACL for %s (%s)\n", query, value);
-           EXEC SQL INQUIRE_SQL (:buffer = ERRORTEXT);
-           printf("SQL error: %s\n",buffer);
-           exit(1);
-       }
-    }
-    EXEC SQL INSERT INTO capacls (capability, tag, list_id)
-      VALUES ('trigger_dcm', 'tdcm', 2);
-
-    /* and the aliases */
-    for (i = 0; aliases[i].name ; i++) {
-       value = aliases[i].name;
-       type = aliases[i].type;
-       trans = aliases[i].trans;
-       EXEC SQL INSERT INTO alias (name, type, trans)
-         VALUES (:value, :type, :trans);
-    }
-
-    printf("\nNow committing work... ");
-#ifsql INGRES
-    EXEC SQL COMMIT WORK;
-#endsql
-
-    printf("done.\n");
-    exit(0);
-}
-
-
-/*
- * ingerr: (supposedly) called when Ingres indicates an error.
- * I have not yet been able to get this to work to intercept a
- * database open error.
- */
-
-int ingerr()
-{
-    ingres_errno = -sqlca.sqlcode;
-    return ingres_errno;
-}
-
-
-/* dummy routines */
-int access_user() {}
-int access_login() {}
-int access_list() {}
-int access_visible_list() {}
-int access_vis_list_by_name() {}
-int access_member() {}
-int access_qgli() {}
-int access_service() {}
-int access_filesys() {}
-int setup_ausr() {}
-int setup_dusr() {}
-int setup_spop() {}
-int setup_dpob() {}
-int setup_dmac() {}
-int setup_dclu() {}
-int setup_alis() {}
-int setup_dlis() {}
-int setup_dsin() {}
-int setup_dshi() {}
-int setup_afil() {}
-int setup_ufil() {}
-int setup_dfil() {}
-int setup_dnfp() {}
-int setup_dqot() {}
-int setup_sshi() {}
-int setup_akum() {}
-int followup_fix_modby() {}
-int followup_ausr() {}
-int followup_gpob() {}
-int followup_glin() {}
-int followup_aqot() {}
-int followup_gzcl() {}
-int followup_gsha() {}
-int followup_gqot() {}
-int set_modtime() {}
-int set_modtime_by_id() {}
-int set_finger_modtime() {}
-int set_pobox_modtime() {}
-int set_uppercase_modtime() {}
-int set_mach_modtime_by_id() {}
-int set_cluster_modtime_by_id() {}
-int set_serverhost_modtime() {}
-int set_nfsphys_modtime() {}
-int set_filesys_modtime() {}
-int set_zephyr_modtime() {}
-int set_pobox() {}
-int get_list_info() {}
-int add_member_to_list() {}
-int delete_member_from_list() {}
-int get_ace_use() {}
-int qualified_get_lists() {}
-int get_members_of_list() {}
-int qualified_get_server() {}
-int qualified_get_serverhost() {}
-int trigger_dcm() {}
-int count_members_of_list() {}
-int get_lists_of_member() {}
-int register_user() {}
-int followup_gpce() {}
-int prefetch_value() {}
-int prefetch_filesys() {}
-int followup_dqot() {}
-int followup_guax() {}
-int followup_uuac() {}
-int get_end_members_of_list() {}
-int _sdl_followup() {}
-int access_host() {}
-int access_ahal() {}
-int setup_dsnt() {}
-int setup_ahst() {}
-int setup_ahal() {}
-int followup_gsnt() {}
-int followup_ghst() {}
-int access_snt() {}
-int get_hostalias() {}
diff --git a/db/schema b/db/schema
deleted file mode 100644 (file)
index cb276f5..0000000
--- a/db/schema
+++ /dev/null
@@ -1,323 +0,0 @@
-create table users
-(
-        login          VARCHAR(8)      NOT NULL WITH DEFAULT,
-       users_id        INTEGER         NOT NULL WITH DEFAULT,
-       uid             SMALLINT        NOT NULL WITH DEFAULT,
-       shell           CHAR(32)        NOT NULL WITH DEFAULT,
-       last            VARCHAR(16)     NOT NULL WITH DEFAULT,
-       first           VARCHAR(16)     NOT NULL WITH DEFAULT,
-       middle          CHAR(16)        NOT NULL WITH DEFAULT,
-       status          SMALLINT        NOT NULL WITH DEFAULT,
-       clearid         VARCHAR(16)     NOT NULL WITH DEFAULT,
-       type            CHAR(8)         NOT NULL WITH DEFAULT,
-       comment         INTEGER         NOT NULL WITH DEFAULT,
-       modtime         DATE            NOT NULL WITH DEFAULT,
-       modby           INTEGER         NOT NULL WITH DEFAULT,
-       modwith         CHAR(8)         NOT NULL WITH DEFAULT,
-       fullname        CHAR(32)        NOT NULL WITH DEFAULT,
-       nickname        CHAR(16)        NOT NULL WITH DEFAULT,
-       home_addr       CHAR(82)        NOT NULL WITH DEFAULT,
-       home_phone      CHAR(16)        NOT NULL WITH DEFAULT,
-       office_addr     CHAR(16)        NOT NULL WITH DEFAULT,
-       office_phone    CHAR(12)        NOT NULL WITH DEFAULT,
-       department      CHAR(20)        NOT NULL WITH DEFAULT,
-       affiliation     CHAR(50)        NOT NULL WITH DEFAULT,
-       fmodtime        DATE            NOT NULL WITH DEFAULT,
-       fmodby          INTEGER         NOT NULL WITH DEFAULT,
-       fmodwith        CHAR(8)         NOT NULL WITH DEFAULT,
-       potype          CHAR(8)         NOT NULL WITH DEFAULT,
-       pop_id          INTEGER         NOT NULL WITH DEFAULT,
-       box_id          INTEGER         NOT NULL WITH DEFAULT,
-       pmodtime        DATE            NOT NULL WITH DEFAULT,
-       pmodby          INTEGER         NOT NULL WITH DEFAULT,
-       pmodwith        CHAR(8)         NOT NULL WITH DEFAULT,
-       xname           CHAR(30)        NOT NULL WITH DEFAULT,
-       xdept           CHAR(20)        NOT NULL WITH DEFAULT,
-       xtitle          CHAR(50)        NOT NULL WITH DEFAULT,
-       xaddress        CHAR(82)        NOT NULL WITH DEFAULT,
-       xphone1         CHAR(12)        NOT NULL WITH DEFAULT,
-       xphone2         CHAR(12)        NOT NULL WITH DEFAULT,
-       xmodtime        DATE            NOT NULL WITH DEFAULT,
-       sigdate         INTEGER         NOT NULL WITH DEFAULT,
-       sigwho          INTEGER         NOT NULL WITH DEFAULT,
-       signature       VARCHAR(68)     NOT NULL WITH DEFAULT,
-       secure          INTEGER         NOT NULL WITH DEFAULT,       
-       flag            INTEGER1        NOT NULL WITH DEFAULT
-);
-create table krbmap
-(
-       users_id        INTEGER         NOT NULL WITH DEFAULT,
-       string_id       INTEGER         NOT NULL WITH DEFAULT
-);
-create table machine
-(
-       name            VARCHAR(40)     NOT NULL WITH DEFAULT,
-       mach_id         INTEGER         NOT NULL WITH DEFAULT,
-       vendor          CHAR(16)        NOT NULL WITH DEFAULT,
-       model           CHAR(24)        NOT NULL WITH DEFAULT,
-       os              CHAR(16)        NOT NULL WITH DEFAULT,
-       location        CHAR(16)        NOT NULL WITH DEFAULT,
-       contact         CHAR(32)        NOT NULL WITH DEFAULT,
-       use             INTEGER         NOT NULL WITH DEFAULT,
-       status          INTEGER1        NOT NULL WITH DEFAULT,
-       statuschange    DATE            NOT NULL WITH DEFAULT,
-       snet_id         INTEGER         NOT NULL WITH DEFAULT,
-       address         CHAR(16)        NOT NULL WITH DEFAULT,
-       owner_type      CHAR(8)         NOT NULL WITH DEFAULT,
-       owner_id        INTEGER         NOT NULL WITH DEFAULT,
-       acomment        INTEGER         NOT NULL WITH DEFAULT,
-       ocomment        INTEGER         NOT NULL WITH DEFAULT,
-       created         DATE            NOT NULL WITH DEFAULT,
-       creator         INTEGER         NOT NULL WITH DEFAULT,
-       inuse           DATE            NOT NULL WITH DEFAULT,
-       modtime         DATE            NOT NULL WITH DEFAULT,
-       modby           INTEGER         NOT NULL WITH DEFAULT,
-       modwith         CHAR(8)         NOT NULL WITH DEFAULT
-);
-create table hostalias
-(
-       name            VARCHAR(40)     NOT NULL WITH DEFAULT,
-       mach_id         INTEGER         NOT NULL WITH DEFAULT
-);
-create table subnet
-(
-       name            CHAR(16)        NOT NULL WITH DEFAULT,
-       snet_id         INTEGER         NOT NULL WITH DEFAULT,
-       description     VARCHAR(48)     NOT NULL WITH DEFAULT,
-       saddr           INTEGER         NOT NULL WITH DEFAULT,
-       mask            INTEGER         NOT NULL WITH DEFAULT,
-       low             INTEGER         NOT NULL WITH DEFAULT,
-       high            INTEGER         NOT NULL WITH DEFAULT,
-       prefix          CHAR(8)         NOT NULL WITH DEFAULT,
-       owner_type      CHAR(8)         NOT NULL WITH DEFAULT,
-       owner_id        INTEGER         NOT NULL WITH DEFAULT,
-       modtime         DATE            NOT NULL WITH DEFAULT,
-       modby           INTEGER         NOT NULL WITH DEFAULT,
-       modwith         CHAR(8)         NOT NULL WITH DEFAULT
-);
-create table cluster
-(
-       name            VARCHAR(32)     NOT NULL WITH DEFAULT,
-       clu_id          INTEGER         NOT NULL WITH DEFAULT,
-       description     CHAR(32)        NOT NULL WITH DEFAULT,
-       location        CHAR(64)        NOT NULL WITH DEFAULT,
-       modtime         DATE            NOT NULL WITH DEFAULT,
-       modby           INTEGER         NOT NULL WITH DEFAULT,
-       modwith         CHAR(8)         NOT NULL WITH DEFAULT
-);
-create table mcmap
-(
-       mach_id         INTEGER         NOT NULL WITH DEFAULT,
-       clu_id          INTEGER         NOT NULL WITH DEFAULT
-);
-create table svc
-(
-       clu_id          INTEGER         NOT NULL WITH DEFAULT,
-       serv_label      VARCHAR(16)     NOT NULL WITH DEFAULT,
-       serv_cluster    CHAR(32)        NOT NULL WITH DEFAULT
-);
-create table list
-(
-       name            VARCHAR(32)     NOT NULL WITH DEFAULT,
-       list_id         INTEGER         NOT NULL WITH DEFAULT,
-       active          INTEGER1        NOT NULL WITH DEFAULT,
-       publicflg       INTEGER1        NOT NULL WITH DEFAULT,
-       hidden          INTEGER1        NOT NULL WITH DEFAULT,
-       maillist        INTEGER1        NOT NULL WITH DEFAULT,
-       grouplist       INTEGER1        NOT NULL WITH DEFAULT,
-       gid             SMALLINT        NOT NULL WITH DEFAULT,
-       description     CHAR(255)       NOT NULL WITH DEFAULT,
-       acl_type        CHAR(8)         NOT NULL WITH DEFAULT,
-       acl_id          INTEGER         NOT NULL WITH DEFAULT,
-       modtime         DATE            NOT NULL WITH DEFAULT,
-       modby           INTEGER         NOT NULL WITH DEFAULT,
-       modwith         CHAR(8)         NOT NULL WITH DEFAULT
-);
-create table imembers 
-(
-       list_id         INTEGER         NOT NULL WITH DEFAULT,
-       member_type     CHAR(8)         NOT NULL WITH DEFAULT,
-       member_id       INTEGER         NOT NULL WITH DEFAULT,
-       ref_count       SMALLINT        NOT NULL WITH DEFAULT,
-       direct          SMALLINT        NOT NULL WITH DEFAULT
-);
-create table servers 
-(
-       name            VARCHAR(16)     NOT NULL WITH DEFAULT,
-       update_int      INTEGER         NOT NULL WITH DEFAULT,
-       target_file     CHAR(64)        NOT NULL WITH DEFAULT,
-       script          CHAR(128)       NOT NULL WITH DEFAULT,
-       dfgen           INTEGER         NOT NULL WITH DEFAULT,
-       dfcheck         INTEGER         NOT NULL WITH DEFAULT,
-       type            CHAR(8)         NOT NULL WITH DEFAULT,
-       enable          INTEGER1        NOT NULL WITH DEFAULT,
-       inprogress      INTEGER1        NOT NULL WITH DEFAULT,
-       harderror       INTEGER         NOT NULL WITH DEFAULT,
-       errmsg          CHAR(80)        NOT NULL WITH DEFAULT,
-       acl_type        CHAR(8)         NOT NULL WITH DEFAULT,
-       acl_id          INTEGER         NOT NULL WITH DEFAULT,
-       modtime         DATE            NOT NULL WITH DEFAULT,
-       modby           INTEGER         NOT NULL WITH DEFAULT,
-       modwith         CHAR(8)         NOT NULL WITH DEFAULT 
-);
-create table serverhosts 
-(
-       service         VARCHAR(16)     NOT NULL WITH DEFAULT,
-       mach_id         INTEGER         NOT NULL WITH DEFAULT,
-       success         INTEGER1        NOT NULL WITH DEFAULT,
-       enable          INTEGER1        NOT NULL WITH DEFAULT,
-       override        INTEGER1        NOT NULL WITH DEFAULT,
-       inprogress      INTEGER1        NOT NULL WITH DEFAULT,
-       hosterror       INTEGER         NOT NULL WITH DEFAULT,
-       hosterrmsg      CHAR(80)        NOT NULL WITH DEFAULT,
-       ltt             INTEGER         NOT NULL WITH DEFAULT,
-       lts             INTEGER         NOT NULL WITH DEFAULT,
-       value1          INTEGER         NOT NULL WITH DEFAULT,
-       value2          INTEGER         NOT NULL WITH DEFAULT,
-       value3          CHAR(32)        NOT NULL WITH DEFAULT,
-       modtime         DATE            NOT NULL WITH DEFAULT,
-       modby           INTEGER         NOT NULL WITH DEFAULT,
-       modwith         CHAR(8)         NOT NULL WITH DEFAULT
-);
-create table filesys 
-(
-       filsys_id       INTEGER         NOT NULL WITH DEFAULT,
-       phys_id         INTEGER         NOT NULL WITH DEFAULT,
-       label           VARCHAR(32)     NOT NULL WITH DEFAULT,
-       fs_order        INTEGER2        NOT NULL WITH DEFAULT,
-       type            CHAR(8)         NOT NULL WITH DEFAULT,
-       mach_id         INTEGER         NOT NULL WITH DEFAULT,
-       name            VARCHAR(80)     NOT NULL WITH DEFAULT,
-       mount           CHAR(32)        NOT NULL WITH DEFAULT,
-       access          CHAR(1)         NOT NULL WITH DEFAULT,
-       comments        CHAR(64)        NOT NULL WITH DEFAULT,
-       owner           INTEGER         NOT NULL WITH DEFAULT,
-       owners          INTEGER         NOT NULL WITH DEFAULT,
-       createflg       INTEGER1        NOT NULL WITH DEFAULT,
-       lockertype      CHAR(8)         NOT NULL WITH DEFAULT,
-       modtime         DATE            NOT NULL WITH DEFAULT,
-       modby           INTEGER         NOT NULL WITH DEFAULT,
-       modwith         CHAR(8)         NOT NULL WITH DEFAULT 
-);
-create table fsgroup
-(
-       group_id        INTEGER         NOT NULL WITH DEFAULT,
-       filsys_id       INTEGER         NOT NULL WITH DEFAULT,
-       key             CHAR(8)         NOT NULL WITH DEFAULT
-);
-create table nfsphys 
-(
-       nfsphys_id      INTEGER         NOT NULL WITH DEFAULT,
-       mach_id         INTEGER         NOT NULL WITH DEFAULT,
-       device          CHAR(16)        NOT NULL WITH DEFAULT,
-       dir             VARCHAR(16)     NOT NULL WITH DEFAULT,
-       status          SMALLINT        NOT NULL WITH DEFAULT,
-       allocated       INTEGER         NOT NULL WITH DEFAULT,
-       partsize        INTEGER         NOT NULL WITH DEFAULT,
-       modtime         DATE            NOT NULL WITH DEFAULT,
-       modby           INTEGER         NOT NULL WITH DEFAULT,
-       modwith         CHAR(8)         NOT NULL WITH DEFAULT
-);
-create table quota 
-(
-       filsys_id       INTEGER         NOT NULL WITH DEFAULT,
-       type            CHAR(8)         NOT NULL WITH DEFAULT,
-       entity_id       INTEGER         NOT NULL WITH DEFAULT,
-       phys_id         INTEGER         NOT NULL WITH DEFAULT,
-       quota           INTEGER         NOT NULL WITH DEFAULT,
-       modtime         DATE            NOT NULL WITH DEFAULT,
-       modby           INTEGER         NOT NULL WITH DEFAULT,
-       modwith         CHAR(8)         NOT NULL WITH DEFAULT 
-);
-create table zephyr 
-(
-       class           VARCHAR(16)     NOT NULL WITH DEFAULT,
-       xmt_type        CHAR(8)         NOT NULL WITH DEFAULT,
-       xmt_id          INTEGER         NOT NULL WITH DEFAULT,
-       sub_type        CHAR(8)         NOT NULL WITH DEFAULT,
-       sub_id          INTEGER         NOT NULL WITH DEFAULT,
-       iws_type        CHAR(8)         NOT NULL WITH DEFAULT,
-       iws_id          INTEGER         NOT NULL WITH DEFAULT,
-       iui_type        CHAR(8)         NOT NULL WITH DEFAULT,
-       iui_id          INTEGER         NOT NULL WITH DEFAULT,
-       modtime         DATE            NOT NULL WITH DEFAULT,
-       modby           INTEGER         NOT NULL WITH DEFAULT,
-       modwith         CHAR(8)         NOT NULL WITH DEFAULT 
-);
-create table hostaccess 
-(
-       mach_id         INTEGER         NOT NULL WITH DEFAULT,
-       acl_type        CHAR(8)         NOT NULL WITH DEFAULT,
-       acl_id          INTEGER         NOT NULL WITH DEFAULT,
-       modtime         DATE            NOT NULL WITH DEFAULT,
-       modby           INTEGER         NOT NULL WITH DEFAULT,
-       modwith         CHAR(8)         NOT NULL WITH DEFAULT
-);
-create table strings 
-(
-       string_id       INTEGER         NOT NULL WITH DEFAULT,
-       string          VARCHAR(128)    NOT NULL WITH DEFAULT
-);
-create table services 
-(
-       name            VARCHAR(16)     NOT NULL WITH DEFAULT,
-       protocol        CHAR(8)         NOT NULL WITH DEFAULT,
-       port            SMALLINT        NOT NULL WITH DEFAULT,
-       description     CHAR(64)        NOT NULL WITH DEFAULT,
-       modtime         DATE            NOT NULL WITH DEFAULT,
-       modby           INTEGER         NOT NULL WITH DEFAULT,
-       modwith         CHAR(8)         NOT NULL WITH DEFAULT 
-);
-create table printcap 
-(
-       name            VARCHAR(16)     NOT NULL WITH DEFAULT,
-       mach_id         INTEGER         NOT NULL WITH DEFAULT,
-       dir             CHAR(32)        NOT NULL WITH DEFAULT,
-       rp              CHAR(16)        NOT NULL WITH DEFAULT,
-       quotaserver     INTEGER         NOT NULL WITH DEFAULT,
-       auth            INTEGER1        NOT NULL WITH DEFAULT,
-       price           SMALLINT        NOT NULL WITH DEFAULT,
-       comments        CHAR(64)        NOT NULL WITH DEFAULT,
-       modtime         DATE            NOT NULL WITH DEFAULT,
-       modby           INTEGER         NOT NULL WITH DEFAULT,
-       modwith         CHAR(8)         NOT NULL WITH DEFAULT
-);
-create table palladium
-(
-       name            VARCHAR(32)     NOT NULL WITH DEFAULT,
-       ident           INTEGER         NOT NULL WITH DEFAULT,
-       mach_id         INTEGER         NOT NULL WITH DEFAULT,
-       modtime         DATE            NOT NULL WITH DEFAULT,
-       modby           INTEGER         NOT NULL WITH DEFAULT,
-       modwith         CHAR(8)         NOT NULL WITH DEFAULT
-);
-create table capacls 
-(
-       capability      CHAR(32)        NOT NULL WITH DEFAULT,
-       tag             CHAR(4)         NOT NULL WITH DEFAULT,
-       list_id         INTEGER         NOT NULL WITH DEFAULT
-);
-create table alias 
-(
-       name            VARCHAR(32)     NOT NULL WITH DEFAULT,
-       type            VARCHAR(16)     NOT NULL WITH DEFAULT,
-       trans           VARCHAR(128)    NOT NULL WITH DEFAULT
-);
-create table numvalues 
-(
-       name            VARCHAR(32)     NOT NULL WITH DEFAULT,
-       value           INTEGER         NOT NULL WITH DEFAULT
-);
-create table tblstats 
-(
-       table_name      CHAR(12)        NOT NULL WITH DEFAULT,
-       modtime         DATE            NOT NULL WITH DEFAULT,
-       appends         INTEGER         NOT NULL WITH DEFAULT,
-       updates         INTEGER         NOT NULL WITH DEFAULT,
-       deletes         INTEGER         NOT NULL WITH DEFAULT
-);
-create table incremental
-(
-       tablename       CHAR(16)        NOT NULL WITH DEFAULT,
-       service         CHAR(16)        NOT NULL WITH DEFAULT
-);
diff --git a/db/schema.sql b/db/schema.sql
new file mode 100644 (file)
index 0000000..3ef7655
--- /dev/null
@@ -0,0 +1,349 @@
+create table users
+(
+        login          VARCHAR(8)      DEFAULT CHR(0)  NOT NULL,
+       users_id        INTEGER         DEFAULT 0       NOT NULL,
+       unix_uid        SMALLINT        DEFAULT 0       NOT NULL,
+       shell           CHAR(32)        DEFAULT CHR(0)  NOT NULL,
+       last            VARCHAR(16)     DEFAULT CHR(0)  NOT NULL,
+       first           VARCHAR(16)     DEFAULT CHR(0)  NOT NULL,
+       middle          CHAR(16)        DEFAULT CHR(0)  NOT NULL,
+       status          SMALLINT        DEFAULT 0       NOT NULL,
+       clearid         VARCHAR(16)     DEFAULT CHR(0)  NOT NULL,
+       type            CHAR(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         CHAR(8)         DEFAULT CHR(0)  NOT NULL,
+       fullname        CHAR(32)        DEFAULT CHR(0)  NOT NULL,
+       nickname        CHAR(16)        DEFAULT CHR(0)  NOT NULL,
+       home_addr       CHAR(82)        DEFAULT CHR(0)  NOT NULL,
+       home_phone      CHAR(16)        DEFAULT CHR(0)  NOT NULL,
+       office_addr     CHAR(16)        DEFAULT CHR(0)  NOT NULL,
+       office_phone    CHAR(12)        DEFAULT CHR(0)  NOT NULL,
+       department      CHAR(20)        DEFAULT CHR(0)  NOT NULL,
+       affiliation     CHAR(50)        DEFAULT CHR(0)  NOT NULL,
+       fmodtime        DATE            DEFAULT SYSDATE NOT NULL,
+       fmodby          INTEGER         DEFAULT 0       NOT NULL,
+       fmodwith        CHAR(8)         DEFAULT CHR(0)  NOT NULL,
+       potype          CHAR(8)         DEFAULT CHR(0)  NOT NULL,
+       pop_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        CHAR(8)         DEFAULT CHR(0)  NOT NULL,
+       xname           CHAR(30)        DEFAULT CHR(0)  NOT NULL,
+       xdept           CHAR(20)        DEFAULT CHR(0)  NOT NULL,
+       xtitle          CHAR(50)        DEFAULT CHR(0)  NOT NULL,
+       xaddress        CHAR(82)        DEFAULT CHR(0)  NOT NULL,
+       xphone1         CHAR(12)        DEFAULT CHR(0)  NOT NULL,
+       xphone2         CHAR(12)        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,       
+       flag            INTEGER         DEFAULT 0       NOT NULL
+);
+
+create table krbmap
+(
+       users_id        INTEGER         DEFAULT 0       NOT NULL,
+       string_id       INTEGER         DEFAULT 0       NOT NULL
+);
+
+create table machine
+(
+       name            VARCHAR(40)     DEFAULT CHR(0)  NOT NULL,
+       mach_id         INTEGER         DEFAULT 0       NOT NULL,
+       vendor          CHAR(16)        DEFAULT CHR(0)  NOT NULL,
+       model           CHAR(24)        DEFAULT CHR(0)  NOT NULL,
+       os              CHAR(16)        DEFAULT CHR(0)  NOT NULL,
+       location        CHAR(16)        DEFAULT CHR(0)  NOT NULL,
+       contact         CHAR(32)        DEFAULT CHR(0)  NOT NULL,
+       use             INTEGER         DEFAULT 0       NOT NULL,
+       status          INTEGER         DEFAULT 0       NOT NULL,
+       statuschange    DATE            DEFAULT SYSDATE NOT NULL,
+       snet_id         INTEGER         DEFAULT 0       NOT NULL,
+       address         CHAR(16)        DEFAULT CHR(0)  NOT NULL,
+       owner_type      CHAR(8)         DEFAULT CHR(0)  NOT NULL,
+       owner_id        INTEGER         DEFAULT 0       NOT NULL,
+       acomment        INTEGER         DEFAULT 0       NOT NULL,
+       ocomment        INTEGER         DEFAULT 0       NOT NULL,
+       created         DATE            DEFAULT SYSDATE NOT NULL,
+       creator         INTEGER         DEFAULT 0       NOT NULL,
+       inuse           DATE            DEFAULT SYSDATE NOT NULL,
+       modtime         DATE            DEFAULT SYSDATE NOT NULL,
+       modby           INTEGER         DEFAULT 0       NOT NULL,
+       modwith         CHAR(8)         DEFAULT CHR(0)  NOT NULL
+);
+
+create table hostalias
+(
+       name            VARCHAR(40)     DEFAULT CHR(0)  NOT NULL,
+       mach_id         INTEGER         DEFAULT 0       NOT NULL
+);
+
+create table subnet
+(
+       name            CHAR(16)        DEFAULT CHR(0)  NOT NULL,
+       snet_id         INTEGER         DEFAULT 0       NOT NULL,
+       description     VARCHAR(48)     DEFAULT CHR(0)  NOT NULL,
+       saddr           INTEGER         DEFAULT 0       NOT NULL,
+       mask            INTEGER         DEFAULT 0       NOT NULL,
+       low             INTEGER         DEFAULT 0       NOT NULL,
+       high            INTEGER         DEFAULT 0       NOT NULL,
+       prefix          CHAR(8)         DEFAULT CHR(0)  NOT NULL,
+       owner_type      CHAR(8)         DEFAULT CHR(0)  NOT NULL,
+       owner_id        INTEGER         DEFAULT 0       NOT NULL,
+       modtime         DATE            DEFAULT SYSDATE NOT NULL,
+       modby           INTEGER         DEFAULT 0       NOT NULL,
+       modwith         CHAR(8)         DEFAULT CHR(0)  NOT NULL
+);
+
+create table clusters
+(
+       name            VARCHAR(32)     DEFAULT CHR(0)  NOT NULL,
+       clu_id          INTEGER         DEFAULT 0       NOT NULL,
+       description     CHAR(32)        DEFAULT CHR(0)  NOT NULL,
+       location        CHAR(64)        DEFAULT CHR(0)  NOT NULL,
+       modtime         DATE            DEFAULT SYSDATE NOT NULL,
+       modby           INTEGER         DEFAULT 0       NOT NULL,
+       modwith         CHAR(8)         DEFAULT CHR(0)  NOT NULL
+);
+
+create table mcmap
+(
+       mach_id         INTEGER         DEFAULT 0       NOT NULL,
+       clu_id          INTEGER         DEFAULT 0       NOT NULL
+);
+
+create table svc
+(
+       clu_id          INTEGER         DEFAULT 0       NOT NULL,
+       serv_label      VARCHAR(16)     DEFAULT CHR(0)  NOT NULL,
+       serv_cluster    CHAR(32)        DEFAULT CHR(0)  NOT NULL
+);
+
+create table list
+(
+       name            VARCHAR(32)     DEFAULT CHR(0)  NOT NULL,
+       list_id         INTEGER         DEFAULT 0       NOT NULL,
+       active          INTEGER         DEFAULT 0       NOT NULL,
+       publicflg       INTEGER         DEFAULT 0       NOT NULL,
+       hidden          INTEGER         DEFAULT 0       NOT NULL,
+       maillist        INTEGER         DEFAULT 0       NOT NULL,
+       grouplist       INTEGER         DEFAULT 0       NOT NULL,
+       gid             SMALLINT        DEFAULT 0       NOT NULL,
+       description     CHAR(255)       DEFAULT CHR(0)  NOT NULL,
+       acl_type        CHAR(8)         DEFAULT CHR(0)  NOT NULL,
+       acl_id          INTEGER         DEFAULT 0       NOT NULL,
+       modtime         DATE            DEFAULT SYSDATE NOT NULL,
+       modby           INTEGER         DEFAULT 0       NOT NULL,
+       modwith         CHAR(8)         DEFAULT CHR(0)  NOT NULL
+);
+
+create table imembers 
+(
+       list_id         INTEGER         DEFAULT 0       NOT NULL,
+       member_type     CHAR(8)         DEFAULT CHR(0)  NOT NULL,
+       member_id       INTEGER         DEFAULT 0       NOT NULL,
+       ref_count       SMALLINT        DEFAULT 0       NOT NULL,
+       direct          SMALLINT        DEFAULT 0       NOT NULL
+);
+
+create table servers 
+(
+       name            VARCHAR(16)     DEFAULT CHR(0)  NOT NULL,
+       update_int      INTEGER         DEFAULT 0       NOT NULL,
+       target_file     CHAR(64)        DEFAULT CHR(0)  NOT NULL,
+       script          CHAR(128)       DEFAULT CHR(0)  NOT NULL,
+       dfgen           INTEGER         DEFAULT 0       NOT NULL,
+       dfcheck         INTEGER         DEFAULT 0       NOT NULL,
+       type            CHAR(8)         DEFAULT CHR(0)  NOT NULL,
+       enable          INTEGER         DEFAULT 0       NOT NULL,
+       inprogress      INTEGER         DEFAULT 0       NOT NULL,
+       harderror       INTEGER         DEFAULT 0       NOT NULL,
+       errmsg          CHAR(80)        DEFAULT CHR(0)  NOT NULL,
+       acl_type        CHAR(8)         DEFAULT CHR(0)  NOT NULL,
+       acl_id          INTEGER         DEFAULT 0       NOT NULL,
+       modtime         DATE            DEFAULT SYSDATE NOT NULL,
+       modby           INTEGER         DEFAULT 0       NOT NULL,
+       modwith         CHAR(8)         DEFAULT CHR(0)  NOT NULL
+);
+
+create table serverhosts 
+(
+       service         VARCHAR(16)     DEFAULT CHR(0)  NOT NULL,
+       mach_id         INTEGER         DEFAULT 0       NOT NULL,
+       success         INTEGER         DEFAULT 0       NOT NULL,
+       enable          INTEGER         DEFAULT 0       NOT NULL,
+       override        INTEGER         DEFAULT 0       NOT NULL,
+       inprogress      INTEGER         DEFAULT 0       NOT NULL,
+       hosterror       INTEGER         DEFAULT 0       NOT NULL,
+       hosterrmsg      CHAR(80)        DEFAULT CHR(0)  NOT NULL,
+       ltt             INTEGER         DEFAULT 0       NOT NULL,
+       lts             INTEGER         DEFAULT 0       NOT NULL,
+       value1          INTEGER         DEFAULT 0       NOT NULL,
+       value2          INTEGER         DEFAULT 0       NOT NULL,
+       value3          CHAR(32)        DEFAULT CHR(0)  NOT NULL,
+       modtime         DATE            DEFAULT SYSDATE NOT NULL,
+       modby           INTEGER         DEFAULT 0       NOT NULL,
+       modwith         CHAR(8)         DEFAULT CHR(0)  NOT NULL
+);
+
+create table filesys 
+(
+       filsys_id       INTEGER         DEFAULT 0       NOT NULL,
+       phys_id         INTEGER         DEFAULT 0       NOT NULL,
+       label           VARCHAR(32)     DEFAULT CHR(0)  NOT NULL,
+       fs_order        INTEGER         DEFAULT 0       NOT NULL,
+       type            CHAR(8)         DEFAULT CHR(0)  NOT NULL,
+       mach_id         INTEGER         DEFAULT 0       NOT NULL,
+       name            VARCHAR(80)     DEFAULT CHR(0)  NOT NULL,
+       mount           CHAR(32)        DEFAULT CHR(0)  NOT NULL,
+       rwaccess        CHAR(1)         DEFAULT CHR(0)  NOT NULL,
+       comments        CHAR(64)        DEFAULT CHR(0)  NOT NULL,
+       owner           INTEGER         DEFAULT 0       NOT NULL,
+       owners          INTEGER         DEFAULT 0       NOT NULL,
+       createflg       INTEGER         DEFAULT 0       NOT NULL,
+       lockertype      CHAR(8)         DEFAULT CHR(0)  NOT NULL,
+       modtime         DATE            DEFAULT SYSDATE NOT NULL,
+       modby           INTEGER         DEFAULT 0       NOT NULL,
+       modwith         CHAR(8)         DEFAULT CHR(0)  NOT NULL
+);
+
+create table fsgroup
+(
+       group_id        INTEGER         DEFAULT 0       NOT NULL,
+       filsys_id       INTEGER         DEFAULT 0       NOT NULL,
+       key             CHAR(8)         DEFAULT CHR(0)  NOT NULL
+);
+
+create table nfsphys 
+(
+       nfsphys_id      INTEGER         DEFAULT 0       NOT NULL,
+       mach_id         INTEGER         DEFAULT 0       NOT NULL,
+       device          CHAR(16)        DEFAULT CHR(0)  NOT NULL,
+       dir             VARCHAR(16)     DEFAULT CHR(0)  NOT NULL,
+       status          SMALLINT        DEFAULT 0       NOT NULL,
+       allocated       INTEGER         DEFAULT 0       NOT NULL,
+       partsize        INTEGER         DEFAULT 0       NOT NULL,
+       modtime         DATE            DEFAULT SYSDATE NOT NULL,
+       modby           INTEGER         DEFAULT 0       NOT NULL,
+       modwith         CHAR(8)         DEFAULT CHR(0)  NOT NULL
+);
+
+create table quota 
+(
+       filsys_id       INTEGER         DEFAULT 0       NOT NULL,
+       type            CHAR(8)         DEFAULT CHR(0)  NOT NULL,
+       entity_id       INTEGER         DEFAULT 0       NOT NULL,
+       phys_id         INTEGER         DEFAULT 0       NOT NULL,
+       quota           INTEGER         DEFAULT 0       NOT NULL,
+       modtime         DATE            DEFAULT SYSDATE NOT NULL,
+       modby           INTEGER         DEFAULT 0       NOT NULL,
+       modwith         CHAR(8)         DEFAULT CHR(0)  NOT NULL
+);
+
+create table zephyr 
+(
+       class           VARCHAR(16)     DEFAULT CHR(0)  NOT NULL,
+       xmt_type        CHAR(8)         DEFAULT CHR(0)  NOT NULL,
+       xmt_id          INTEGER         DEFAULT 0       NOT NULL,
+       sub_type        CHAR(8)         DEFAULT CHR(0)  NOT NULL,
+       sub_id          INTEGER         DEFAULT 0       NOT NULL,
+       iws_type        CHAR(8)         DEFAULT CHR(0)  NOT NULL,
+       iws_id          INTEGER         DEFAULT 0       NOT NULL,
+       iui_type        CHAR(8)         DEFAULT CHR(0)  NOT NULL,
+       iui_id          INTEGER         DEFAULT 0       NOT NULL,
+       modtime         DATE            DEFAULT SYSDATE NOT NULL,
+       modby           INTEGER         DEFAULT 0       NOT NULL,
+       modwith         CHAR(8)         DEFAULT CHR(0)  NOT NULL
+);
+
+create table hostaccess 
+(
+       mach_id         INTEGER         DEFAULT 0       NOT NULL,
+       acl_type        CHAR(8)         DEFAULT CHR(0)  NOT NULL,
+       acl_id          INTEGER         DEFAULT 0       NOT NULL,
+       modtime         DATE            DEFAULT SYSDATE NOT NULL,
+       modby           INTEGER         DEFAULT 0       NOT NULL,
+       modwith         CHAR(8)         DEFAULT CHR(0)  NOT NULL
+);
+
+create table strings 
+(
+       string_id       INTEGER         DEFAULT 0       NOT NULL,
+       string          VARCHAR(128)    DEFAULT CHR(0)  NOT NULL
+);
+
+create table services 
+(
+       name            VARCHAR(16)     DEFAULT CHR(0)  NOT NULL,
+       protocol        CHAR(8)         DEFAULT CHR(0)  NOT NULL,
+       port            SMALLINT        DEFAULT 0       NOT NULL,
+       description     CHAR(64)        DEFAULT CHR(0)  NOT NULL,
+       modtime         DATE            DEFAULT SYSDATE NOT NULL,
+       modby           INTEGER         DEFAULT 0       NOT NULL,
+       modwith         CHAR(8)         DEFAULT CHR(0)  NOT NULL
+);
+
+create table printcap 
+(
+       name            VARCHAR(16)     DEFAULT CHR(0)  NOT NULL,
+       mach_id         INTEGER         DEFAULT 0       NOT NULL,
+       dir             CHAR(32)        DEFAULT CHR(0)  NOT NULL,
+       rp              CHAR(16)        DEFAULT CHR(0)  NOT NULL,
+       quotaserver     INTEGER         DEFAULT 0       NOT NULL,
+       auth            INTEGER         DEFAULT 0       NOT NULL,
+       price           SMALLINT        DEFAULT 0       NOT NULL,
+       comments        CHAR(64)        DEFAULT CHR(0)  NOT NULL,
+       modtime         DATE            DEFAULT SYSDATE NOT NULL,
+       modby           INTEGER         DEFAULT 0       NOT NULL,
+       modwith         CHAR(8)         DEFAULT CHR(0)  NOT NULL
+);
+
+create table palladium
+(
+       name            VARCHAR(32)     DEFAULT CHR(0)  NOT NULL,
+       identifier      INTEGER         DEFAULT 0       NOT NULL,
+       mach_id         INTEGER         DEFAULT 0       NOT NULL,
+       modtime         DATE            DEFAULT SYSDATE NOT NULL,
+       modby           INTEGER         DEFAULT 0       NOT NULL,
+       modwith         CHAR(8)         DEFAULT CHR(0)  NOT NULL
+);
+
+create table capacls 
+(
+       capability      CHAR(32)        DEFAULT CHR(0)  NOT NULL,
+       tag             CHAR(4)         DEFAULT CHR(0)  NOT NULL,
+       list_id         INTEGER         DEFAULT 0       NOT NULL
+);
+
+create table alias 
+(
+       name            VARCHAR(32)     DEFAULT CHR(0)  NOT NULL,
+       type            VARCHAR(16)     DEFAULT CHR(0)  NOT NULL,
+       trans           VARCHAR(128)    DEFAULT CHR(0)  NOT NULL
+);
+
+create table numvalues 
+(
+       name            VARCHAR(32)     DEFAULT CHR(0)  NOT NULL,
+       value           INTEGER         DEFAULT 0       NOT NULL
+);
+
+create table tblstats 
+(
+       table_name      CHAR(16)        DEFAULT CHR(0)  NOT NULL,
+       modtime         DATE            DEFAULT SYSDATE NOT NULL,
+       appends         INTEGER         DEFAULT 0       NOT NULL,
+       updates         INTEGER         DEFAULT 0       NOT NULL,
+       deletes         INTEGER         DEFAULT 0       NOT NULL
+);
+
+create table incremental
+(
+       table_name      CHAR(16)        DEFAULT CHR(0)  NOT NULL,
+       service         CHAR(16)        DEFAULT CHR(0)  NOT NULL
+);
diff --git a/db/unschema.sql b/db/unschema.sql
new file mode 100644 (file)
index 0000000..680f8b5
--- /dev/null
@@ -0,0 +1,27 @@
+drop table users;
+drop table krbmap;
+drop table machine;
+drop table hostalias;
+drop table subnet;
+drop table clusters;
+drop table mcmap;
+drop table svc;
+drop table list;
+drop table imembers ;
+drop table servers ;
+drop table serverhosts ;
+drop table filesys ;
+drop table fsgroup;
+drop table nfsphys ;
+drop table quota ;
+drop table zephyr ;
+drop table hostaccess ;
+drop table strings ;
+drop table services ;
+drop table printcap ;
+drop table palladium;
+drop table capacls ;
+drop table alias ;
+drop table numvalues ;
+drop table tblstats ;
+drop table incremental;
This page took 3.291636 seconds and 5 git commands to generate.