Index: pykota/trunk/initscripts/ldap/pykota-sample.ldif
===================================================================
--- pykota/trunk/initscripts/ldap/pykota-sample.ldif (revision 1098)
+++ pykota/trunk/initscripts/ldap/pykota-sample.ldif (revision 1200)
@@ -2,5 +2,8 @@
 # PyKota sample LDAP directory tree
 #
-# DON'T USE THIS. THIS IS AN EXAMPLE.
+# YOU CAN USE IT TO CREATE AN INITIAL LDAP TREE WITH PYKOTA SUPPORT.
+# 
+# ITS STRUCTURE IS AN EXAMPLE : YOU CAN USE WHATEVER STRUCTURE YOU WANT,
+# PROVIDED YOU PUT CORRECT CONFIGURATION PARAMETERS IN /etc/pykota/pykota.conf
 # 
 # $Id$
@@ -39,83 +42,2 @@
 objectClass: organizationalUnit
 
-dn: uid=jerome,ou=People,dc=librelogiciel,dc=com
-uid: jerome
-cn:: SmVyb21lIEFsZXQ=
-objectClass: account
-objectClass: posixAccount
-objectClass: top
-objectClass: shadowAccount
-objectClass: pykotaAccount
-objectClass: pykotaAccountBalance
-userPassword: {crypt}PvuIT4Mz8.lCM
-shadowLastChange: 12093
-shadowMax: 99999
-shadowWarning: 7
-loginShell: /bin/bash
-uidNumber: 500
-gidNumber: 500
-homeDirectory: /home/jerome
-gecos: Jerome Alet,,,
-pykotaUserName: jerome
-pykotaLimitBy: quota
-pykotaBalance: 9.25
-pykotaLifeTimePaid: 10
-
-dn: cn=devel,ou=Groups,dc=librelogiciel,dc=com
-objectClass: posixGroup
-objectClass: top
-objectClass: pykotaGroup
-cn: devel
-userPassword: {crypt}x
-gidNumber: 500
-memberUid: jerome
-pykotaGroupName: devel
-pykotaLimitBy: quota
-
-dn: cn=apple,ou=Printers,ou=PyKota,dc=librelogiciel,dc=com
-objectClass: pykotaObject
-objectClass: pykotaPrinter
-cn: apple
-pykotaPrinterName: apple
-pykotaPricePerPage: 0.1
-pykotaPricePerJob: 0.25
-
-dn: cn=uniqueidentifier01,ou=UQuotas,ou=PyKota,dc=librelogiciel,dc=com
-objectClass: pykotaObject
-objectClass: pykotaUserPQuota
-cn: uniqueidentifier01
-pykotaUserName: jerome
-pykotaPrinterName: apple
-pykotaPageCounter: 5
-pykotaLifePageCounter: 5
-pykotaSoftLimit: 100
-pykotaHardLimit: 110
-pykotaDateLimit: None
-
-dn: cn=uniqueidentifier02,ou=GQuotas,ou=PyKota,dc=librelogiciel,dc=com
-objectClass: pykotaObject
-objectClass: pykotaGroupPQuota
-cn: uniqueidentifier02
-pykotaGroupName: devel
-pykotaPrinterName: apple
-pykotaSoftLimit: 400
-pykotaHardLimit: 450
-pykotaDateLimit: None
-
-dn: cn=uniqueidentifier03,ou=Jobs,ou=PyKota,dc=librelogiciel,dc=com
-objectClass: pykotaObject
-objectClass: pykotaJob
-cn: uniqueidentifier03
-pykotaUserName: jerome
-pykotaPrinterName: apple
-pykotaJobId: 15
-pykotaPrinterPageCounter: 1533
-pykotaJobSize: 5
-pykotaAction: ALLOW
-
-dn: cn=uniqueidentifier04,ou=LastJobs,ou=PyKota,dc=librelogiciel,dc=com
-objectClass: pykotaObject
-objectClass: pykotaLastJob
-cn: uniqueidentifier04
-pykotaPrinterName: apple
-pykotaLastJobIdent: uniqueidentifier03
Index: pykota/trunk/initscripts/ldap/pykota.schema
===================================================================
--- pykota/trunk/initscripts/ldap/pykota.schema (revision 1108)
+++ pykota/trunk/initscripts/ldap/pykota.schema (revision 1200)
@@ -100,6 +100,6 @@
 attributetype ( 1.3.6.1.4.1.16868.1.1.13 NAME 'pykotaJobSize'
         DESC 'Current job size in number of pages in the history'
-        EQUALITY caseIgnoreIA5Match
-        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
+        EQUALITY integerMatch
+        SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
 
 # pykotaAction
@@ -112,5 +112,6 @@
 attributetype ( 1.3.6.1.4.1.16868.1.1.15 NAME 'pykotaPrinterName'
         DESC 'PyKota printer name as received from the printing subsystem'
-        EQUALITY caseIgnoreIA5Match
+        EQUALITY caseExactIA5Match
+        SUBSTR caseExactIA5SubstringsMatch
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
         
@@ -119,4 +120,5 @@
         DESC 'PyKota user name'
         EQUALITY caseExactIA5Match
+        SUBSTR caseExactIA5SubstringsMatch
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
         
@@ -125,4 +127,5 @@
         DESC 'PyKota group name'
         EQUALITY caseExactIA5Match
+        SUBSTR caseExactIA5SubstringsMatch
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
         
@@ -131,4 +134,31 @@
         DESC 'Identifies the last job in the history'
         EQUALITY caseExactIA5Match
+        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
+        
+# pykotaFileName        
+attributetype ( 1.3.6.1.4.1.16868.1.1.19 NAME 'pykotaFileName'
+        DESC 'Print job filename'
+        EQUALITY caseExactIA5Match
+        SUBSTR caseExactIA5SubstringsMatch
+        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
+        
+# pykotaTitle        
+attributetype ( 1.3.6.1.4.1.16868.1.1.20 NAME 'pykotaTitle'
+        DESC 'Print job title'
+        EQUALITY caseIgnoreIA5Match
+        SUBSTR caseIgnoreIA5SubstringsMatch
+        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
+        
+# pykotaCopies
+attributetype ( 1.3.6.1.4.1.16868.1.1.21 NAME 'pykotaCopies'
+        DESC 'Number of copies of the current print job'
+        EQUALITY integerMatch
+        SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
+        
+# pykotaOptions        
+attributetype ( 1.3.6.1.4.1.16868.1.1.22 NAME 'pykotaOptions'
+        DESC 'Print job options'
+        EQUALITY caseExactIA5Match
+        SUBSTR caseExactIA5SubstringsMatch
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
         
@@ -171,5 +201,5 @@
         DESC 'An entry in the job history for a printer'
         MUST ( cn $ pykotaUserName $ pykotaPrinterName $ pykotaJobId )
-        MAY  ( pykotaPrinterPageCounter $ pykotaJobSize $ pykotaAction ) )
+        MAY  ( pykotaPrinterPageCounter $ pykotaJobSize $ pykotaAction $ pykotaFileName $ pykotaTitle $ pykotaCopies $ pykotaOptions ) )
         
 # pykotaAccountBalance
Index: pykota/trunk/initscripts/ldap/README.ldap
===================================================================
--- pykota/trunk/initscripts/ldap/README.ldap (revision 1165)
+++ pykota/trunk/initscripts/ldap/README.ldap (revision 1200)
@@ -56,14 +56,8 @@
       But we recommend that you add these :  
       
-        index pykotaUserName eq
-        index pykotaGroupName eq
-        index pykotaPrinterName eq
+        index pykotaUserName pres,eq,sub
+        index pykotaGroupName pres,eq,sub
+        index pykotaPrinterName pres,eq,sub
         index pykotaLastJobIdent eq
-        
-      NB : PyKota's schema doesn't currently allow substring
-           matches, but they would probably be very helpful
-           for the pykotaUserName, pykotaGroupName and pykotaPrinterName
-           attributes. This problem will be solved in a future
-           release.
         
     Finally, restart the OpenLDAP server :    
@@ -73,7 +67,10 @@
 pykota-sample.ldif :
 
-    This file represents a sample LDAP directory tree dump with
-    PyKota functionnalities. 
-    DON'T USE THIS FILE. IT IS JUST THERE TO SERVE AS AN EXAMPLE.
+    You can use this file to initialize an LDAP tree for PyKota, if
+    you want.
+    
+    The structure used in this file is NOT mandatory !
+    Provided you put correct parameters into /etc/pykota/pykota.conf,
+    you can structure your LDAP directory the way you want.
     
 To use an LDAP directory as the Quota Storage, just modify  
Index: pykota/trunk/initscripts/postgresql/README.postgresql
===================================================================
--- pykota/trunk/initscripts/postgresql/README.postgresql (revision 1079)
+++ pykota/trunk/initscripts/postgresql/README.postgresql (revision 1200)
@@ -51,4 +51,7 @@
 Upgrade scripts :
 
+  DON'T DO ANYTHING IF THIS IS YOUR FIRST INSTALLATION
+  OF PYKOTA.
+
   Some scripts to upgrade old PyKota databases to the new
   database schema are included. You may have to run all
@@ -56,5 +59,20 @@
   version of PyKota.
   
+  * An SQL script to upgrade a pre-1.16 PyKota Storage DataBase to
+    1.16 is included. Launch it this way on the Quota Storage Server :
+    
+        $ psql -U postgres pykota
+        pykota=# \i upgrade-to-1.16.sql
+        pykota=# \q
+        $
+        
+    This script adds some fields to the print job history, so that
+    more complete information will be known. The fields that
+    are added are : filename, title, copies and print command options.
+    Also some indexes are created to speed things up.
   
+What is below is for historical reasons only, real people don't use  
+such old beasts, and YOU SHOULDN'T EITHER !
+
   * An SQL script to upgrade a pre-1.14 PyKota Storage DataBase to
     1.14 is included. Launch it this way on the Quota Storage Server :
@@ -69,7 +87,4 @@
     messages in case he is over quota.
     
-What is below is for historical reasons only, real people don't use  
-such old beasts, and YOU SHOULDN'T EITHER !
-
   * An sql script to upgrade a pre-1.01 PyKota Quota Storage DataBase to 
     1.01 is still included for historical reasons. PLEASE DON'T USE IT ! 
Index: pykota/trunk/initscripts/postgresql/pykota-postgresql.sql
===================================================================
--- pykota/trunk/initscripts/postgresql/pykota-postgresql.sql (revision 1087)
+++ pykota/trunk/initscripts/postgresql/pykota-postgresql.sql (revision 1200)
@@ -20,4 +20,7 @@
 --
 -- $Log$
+-- Revision 1.5  2003/11/21 14:28:45  jalet
+-- More complete job history.
+--
 -- Revision 1.4  2003/07/16 21:53:07  jalet
 -- Really big modifications wrt new configuration file's location and content.
@@ -97,4 +100,5 @@
                         hardlimit INT4,
                         datelimit TIMESTAMP);
+CREATE UNIQUE INDEX userpquota_up_id_ix ON userpquota (userid, printerid);
                         
 --
@@ -108,5 +112,11 @@
                         jobsize INT4,
                         action TEXT,
+                        filename TEXT,
+                        title TEXT,
+                        copies INT4,
+                        options TEXT,
                         jobdate TIMESTAMP DEFAULT now());
+CREATE INDEX jobhistory_p_id_ix ON jobhistory (printerid);
+CREATE INDEX jobhistory_pd_id_ix ON jobhistory (printerid, jobdate);
                         
 --
@@ -119,4 +129,5 @@
                          hardlimit INT4,
                          datelimit TIMESTAMP);
+CREATE UNIQUE INDEX grouppquota_up_id_ix ON grouppquota (groupid, printerid);
                         
 --                         
Index: pykota/trunk/initscripts/README
===================================================================
--- pykota/trunk/initscripts/README (revision 1037)
+++ pykota/trunk/initscripts/README (revision 1200)
@@ -45,4 +45,16 @@
 =============================================================================
     
+  * upgrade-to-1.16.sql :  
+  
+    This file upgrades the PostgreSQL Quota Storage Database schema
+    from versions before 1.16 to version 1.16.
+    NEVER USE IT IF YOU ALREADY RUN 1.16 OR ABOVE !
+    
+  * upgrade-to-1.14.sql :  
+  
+    This file upgrades the PostgreSQL Quota Storage Database schema
+    from versions before 1.14 to version 1.14.
+    NEVER USE IT IF YOU ALREADY RUN 1.14 OR ABOVE !
+    
   * VERYOLDpykota-upgrade-postgresql.sql :
   
