Index: pykota/trunk/initscripts/postgresql/pykota-postgresql.sql
===================================================================
--- pykota/trunk/initscripts/postgresql/pykota-postgresql.sql (revision 2303)
+++ pykota/trunk/initscripts/postgresql/pykota-postgresql.sql (revision 2317)
@@ -53,4 +53,5 @@
                    lifetimepaid FLOAT DEFAULT 0.0,
                    limitby TEXT DEFAULT 'quota',
+                   description TEXT,
                    overcharge FLOAT NOT NULL DEFAULT 1.0);
                    
@@ -60,4 +61,5 @@
 CREATE TABLE groups(id SERIAL PRIMARY KEY NOT NULL,
                     groupname TEXT UNIQUE NOT NULL,
+                    description TEXT,
                     limitby TEXT DEFAULT 'quota');
                     
@@ -69,5 +71,7 @@
                       description TEXT,
                       priceperpage FLOAT DEFAULT 0.0,
-                      priceperjob FLOAT DEFAULT 0.0);
+                      priceperjob FLOAT DEFAULT 0.0,
+                      passthrough BOOLEAN DEFAULT 'f',
+                      maxjobsize INT4);
                     
 --
@@ -82,4 +86,6 @@
                         hardlimit INT4,
                         datelimit TIMESTAMP,
+                        maxjobsize INT4,
+                        temporarydenied BOOLEAN DEFAULT 'f',
                         warncount INT4 DEFAULT 0); 
 CREATE INDEX userpquota_u_id_ix ON userpquota (userid);
@@ -107,4 +113,6 @@
                         pages TEXT,
                         billingcode TEXT,
+                        precomputedjobsize INT4,
+                        precomputedjobprice FLOAT,
                         jobdate TIMESTAMP DEFAULT now(),
                         CONSTRAINT checkUserPQuota FOREIGN KEY (userid, printerid) REFERENCES userpquota(userid, printerid));
@@ -122,4 +130,5 @@
                          softlimit INT4,
                          hardlimit INT4,
+                         maxjobsize INT4,
                          datelimit TIMESTAMP);
 CREATE INDEX grouppquota_g_id_ix ON grouppquota (groupid);
@@ -158,12 +167,20 @@
                            CONSTRAINT coeffconstraint UNIQUE (printerid, label));
 
+-- 
+-- Create the table for the billing codes
+--
+CREATE TABLE billingcodes (id SERIAL PRIMARY KEY NOT NULL,
+                           label TEXT UNIQUE NOT NULL,
+                           balance FLOAT DEFAULT 0.0,
+                           pagecounter INT4 DEFAULT 0);
+
 --                        
 -- Set some ACLs                        
 --
-REVOKE ALL ON users, groups, printers, userpquota, grouppquota, groupsmembers, printergroupsmembers, jobhistory, payments, coefficients FROM public;                        
-REVOKE ALL ON users_id_seq, groups_id_seq, printers_id_seq, userpquota_id_seq, grouppquota_id_seq, jobhistory_id_seq, payments_id_seq, coefficients_id_seq FROM public;
+REVOKE ALL ON users, groups, printers, userpquota, grouppquota, groupsmembers, printergroupsmembers, jobhistory, payments, coefficients, billingcodes FROM public;
+REVOKE ALL ON users_id_seq, groups_id_seq, printers_id_seq, userpquota_id_seq, grouppquota_id_seq, jobhistory_id_seq, payments_id_seq, coefficients_id_seq, billingcodes_id_seq FROM public;
 
-GRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES ON users, groups, printers, userpquota, grouppquota, groupsmembers, printergroupsmembers, jobhistory, payments, coefficients TO pykotaadmin;
-GRANT SELECT, UPDATE ON users_id_seq, groups_id_seq, printers_id_seq, userpquota_id_seq, grouppquota_id_seq, jobhistory_id_seq, payments_id_seq, coefficients_id_seq TO pykotaadmin;
-GRANT SELECT ON users, groups, printers, userpquota, grouppquota, groupsmembers, printergroupsmembers, jobhistory, payments, coefficients TO pykotauser;
+GRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES ON users, groups, printers, userpquota, grouppquota, groupsmembers, printergroupsmembers, jobhistory, payments, coefficients, billingcodes TO pykotaadmin;
+GRANT SELECT, UPDATE ON users_id_seq, groups_id_seq, printers_id_seq, userpquota_id_seq, grouppquota_id_seq, jobhistory_id_seq, payments_id_seq, coefficients_id_seq, billingcodes_id_seq TO pykotaadmin;
+GRANT SELECT ON users, groups, printers, userpquota, grouppquota, groupsmembers, printergroupsmembers, jobhistory, payments, coefficients, billingcodes TO pykotauser;
 
