Index: pykota/trunk/pykota/storages/sql.py
===================================================================
--- pykota/trunk/pykota/storages/sql.py (revision 3541)
+++ pykota/trunk/pykota/storages/sql.py (revision 3549)
@@ -62,5 +62,5 @@
         printer.PricePerJob = record.get("priceperjob") or 0.0
         printer.PricePerPage = record.get("priceperpage") or 0.0
-        printer.MaxJobSize = record.get("maxjobsize") or 0
+        printer.MaxJobSize = record.get("maxjobsize")
         printer.PassThrough = record.get("passthrough") or 0
         if printer.PassThrough in (1, "1", "t", "true", "TRUE", "True") :
@@ -119,4 +119,5 @@
         userpquota.HardLimit = record.get("hardlimit")
         userpquota.DateLimit = record.get("datelimit")
+        userpquota.MaxJobSize = record.get("maxjobsize")
         userpquota.WarnCount = record.get("warncount") or 0
         userpquota.Exists = True
@@ -243,5 +244,5 @@
             thefilter = "AND %s" % thefilter
         orderby = self.createOrderBy(["+grouppquota.id"], ordering)
-        result = self.doRawSearch("SELECT groups.groupname,printers.printername,grouppquota.*,coalesce(sum(pagecounter), 0) AS pagecounter,coalesce(sum(lifepagecounter), 0) AS lifepagecounter FROM groups,printers,grouppquota,userpquota WHERE groups.id=grouppquota.groupid AND printers.id=grouppquota.printerid AND userpquota.printerid=grouppquota.printerid AND userpquota.userid IN (SELECT userid FROM groupsmembers WHERE groupsmembers.groupid=grouppquota.groupid) %(thefilter)s GROUP BY grouppquota.id,grouppquota.groupid,grouppquota.printerid,grouppquota.softlimit,grouppquota.hardlimit,grouppquota.datelimit,grouppquota.maxjobsize,groups.groupname,printers.printername ORDER BY %(orderby)s" % locals())
+        result = self.doRawSearch("SELECT groups.groupname,printers.printername,grouppquota.*,coalesce(sum(pagecounter), 0) AS pagecounter,coalesce(sum(lifepagecounter), 0) AS lifepagecounter FROM groups,printers,grouppquota,userpquota WHERE groups.id=grouppquota.groupid AND printers.id=grouppquota.printerid AND userpquota.printerid=grouppquota.printerid AND userpquota.userid IN (SELECT userid FROM groupsmembers WHERE groupsmembers.groupid=grouppquota.groupid) %(thefilter)s GROUP BY grouppquota.id,grouppquota.groupid,grouppquota.printerid,grouppquota.softlimit,grouppquota.hardlimit,grouppquota.datelimit,groups.groupname,printers.printername ORDER BY %(orderby)s" % locals())
         return self.prepareRawResult(result)
 
@@ -560,5 +561,5 @@
                           % (self.doQuote(unicodeToDatabase(printer.Name)), \
                              self.doQuote((printer.PassThrough and "t") or "f"), \
-                             self.doQuote(printer.MaxJobSize or 0), \
+                             self.doQuote(printer.MaxJobSize), \
                              self.doQuote(unicodeToDatabase(printer.Description)), \
                              self.doQuote(printer.PricePerPage or 0.0), \
@@ -650,11 +651,10 @@
         if oldentry.Exists :
             return oldentry
-        self.doModify("INSERT INTO grouppquota (groupid, printerid, softlimit, hardlimit, datelimit, maxjobsize) VALUES (%s, %s, %s, %s, %s, %s)" \
+        self.doModify("INSERT INTO grouppquota (groupid, printerid, softlimit, hardlimit, datelimit) VALUES (%s, %s, %s, %s, %s)" \
                           % (self.doQuote(gpq.Group.ident), \
                              self.doQuote(gpq.Printer.ident), \
                              self.doQuote(gpq.SoftLimit), \
                              self.doQuote(gpq.HardLimit), \
-                             self.doQuote(gpq.DateLimit), \
-                             self.doQuote(gpq.MaxJobSize)))
+                             self.doQuote(gpq.DateLimit)))
         gpq.isDirty = False
         return None # the entry created doesn't need further modification
@@ -664,5 +664,5 @@
         self.doModify("UPDATE printers SET passthrough=%s, maxjobsize=%s, description=%s, priceperpage=%s, priceperjob=%s WHERE id=%s" \
                               % (self.doQuote((printer.PassThrough and "t") or "f"), \
-                                 self.doQuote(printer.MaxJobSize or 0), \
+                                 self.doQuote(printer.MaxJobSize), \
                                  self.doQuote(unicodeToDatabase(printer.Description)), \
                                  self.doQuote(printer.PricePerPage or 0.0), \
Index: pykota/trunk/pykota/storages/ldapstorage.py
===================================================================
--- pykota/trunk/pykota/storages/ldapstorage.py (revision 3532)
+++ pykota/trunk/pykota/storages/ldapstorage.py (revision 3549)
@@ -447,5 +447,10 @@
             printer.PricePerJob = float(fields.get("pykotaPricePerJob", [0.0])[0])
             printer.PricePerPage = float(fields.get("pykotaPricePerPage", [0.0])[0])
-            printer.MaxJobSize = int(fields.get("pykotaMaxJobSize", [0])[0])
+            printer.MaxJobSize = fields.get("pykotaMaxJobSize")
+            if printer.MaxJobSize is not None :
+                if printer.MaxJobSize[0].upper() == "NONE" :
+                    printer.MaxJobSize = None
+                else :
+                    printer.MaxJobSize = int(printer.MaxJobSize[0])
             printer.PassThrough = fields.get("pykotaPassThrough", [None])[0]
             if printer.PassThrough in (1, "1", "t", "true", "TRUE", "True") :
@@ -513,5 +518,5 @@
             result = self.doSearch("(&(objectClass=pykotaGroupPQuota)(pykotaGroupName=%s)(pykotaPrinterName=%s))" % \
                                       (unicodeToDatabase(group.Name), unicodeToDatabase(printer.Name)), \
-                                      ["pykotaSoftLimit", "pykotaHardLimit", "pykotaDateLimit", "pykotaMaxJobSize"], \
+                                      ["pykotaSoftLimit", "pykotaHardLimit", "pykotaDateLimit"], \
                                       base=base)
             if result :
@@ -536,10 +541,4 @@
                     else :
                         grouppquota.DateLimit = grouppquota.DateLimit[0]
-                grouppquota.MaxJobSize = fields.get("pykotaMaxJobSize")
-                if grouppquota.MaxJobSize is not None :
-                    if grouppquota.MaxJobSize[0].upper() == "NONE" :
-                        grouppquota.MaxJobSize = None
-                    else :
-                        grouppquota.MaxJobSize = int(grouppquota.MaxJobSize[0])
                 grouppquota.PageCounter = 0
                 grouppquota.LifePageCounter = 0
@@ -712,5 +711,10 @@
                     printer.PricePerJob = float(fields.get("pykotaPricePerJob", [0.0])[0] or 0.0)
                     printer.PricePerPage = float(fields.get("pykotaPricePerPage", [0.0])[0] or 0.0)
-                    printer.MaxJobSize = int(fields.get("pykotaMaxJobSize", [0])[0])
+                    printer.MaxJobSize = fields.get("pykotaMaxJobSize")
+                    if printer.MaxJobSize is not None :
+                        if printer.MaxJobSize[0].upper() == "NONE" :
+                            printer.MaxJobSize = None
+                        else :
+                            printer.MaxJobSize = int(printer.MaxJobSize[0])
                     printer.PassThrough = fields.get("pykotaPassThrough", [None])[0]
                     if printer.PassThrough in (1, "1", "t", "true", "TRUE", "True") :
@@ -892,5 +896,5 @@
                    "pykotaPrinterName" : printername,
                    "pykotaPassThrough" : (printer.PassThrough and "t") or "f",
-                   "pykotaMaxJobSize" : str(printer.MaxJobSize or 0),
+                   "pykotaMaxJobSize" : str(printer.MaxJobSize),
                    "description" : unicodeToDatabase(printer.Description or ""),
                    "pykotaPricePerPage" : str(printer.PricePerPage or 0.0),
@@ -1070,5 +1074,5 @@
                    "pykotaLifePageCounter" : str(upq.LifePageCounter or 0),
                    "pykotaWarnCount" : str(upq.WarnCount or 0),
-                   "pykotaMaxJobSize" : str(upq.MaxJobSize or 0),
+                   "pykotaMaxJobSize" : str(upq.MaxJobSize),
                  }
         if self.info["userquotabase"].lower() == "user" :
@@ -1106,5 +1110,5 @@
         fields = {
                    "pykotaPassThrough" : (printer.PassThrough and "t") or "f",
-                   "pykotaMaxJobSize" : str(printer.MaxJobSize or 0),
+                   "pykotaMaxJobSize" : str(printer.MaxJobSize),
                    "description" : unicodeToDatabase(printer.Description or ""),
                    "pykotaPricePerPage" : str(printer.PricePerPage or 0.0),
@@ -1251,5 +1255,5 @@
                    "pykotaPageCounter" : str(userpquota.PageCounter or 0),
                    "pykotaLifePageCounter" : str(userpquota.LifePageCounter or 0),
-                   "pykotaMaxJobSize" : str(userpquota.MaxJobSize or 0),
+                   "pykotaMaxJobSize" : str(userpquota.MaxJobSize),
                  }
         self.doModify(userpquota.ident, fields)
@@ -1275,5 +1279,4 @@
                    "pykotaHardLimit" : str(grouppquota.HardLimit),
                    "pykotaDateLimit" : str(grouppquota.DateLimit),
-                   "pykotaMaxJobSize" : str(grouppquota.MaxJobSize or 0),
                  }
         self.doModify(grouppquota.ident, fields)
@@ -1680,10 +1683,10 @@
         entries = [p for p in [self.getPrinter(name) for name in self.getAllPrintersNames(pname)] if p.Exists]
         if entries :
-            fields = ("username", "printername", "dn", "userdn", "printerdn", "lifepagecounter", "pagecounter", "softlimit", "hardlimit", "datelimit")
+            fields = ("username", "printername", "dn", "userdn", "printerdn", "lifepagecounter", "pagecounter", "softlimit", "hardlimit", "datelimit", "maxjobsize")
             result = []
             uname = extractonly.get("username")
             for entry in entries :
                 for (user, userpquota) in self.getPrinterUsersAndQuotas(entry, names=[uname or "*"]) :
-                    result.append((user.Name, entry.Name, userpquota.ident, user.ident, entry.ident, userpquota.LifePageCounter, userpquota.PageCounter, userpquota.SoftLimit, userpquota.HardLimit, userpquota.DateLimit))
+                    result.append((user.Name, entry.Name, userpquota.ident, user.ident, entry.ident, userpquota.LifePageCounter, userpquota.PageCounter, userpquota.SoftLimit, userpquota.HardLimit, userpquota.DateLimit, userpquota.MaxJobSize))
             return [fields] + self.sortRecords(fields, result, ["+userdn"], ordering)
 
Index: pykota/trunk/pykota/storage.py
===================================================================
--- pykota/trunk/pykota/storage.py (revision 3526)
+++ pykota/trunk/pykota/storage.py (revision 3549)
@@ -354,4 +354,9 @@
         return jobprice
 
+    def setMaxJobSize(self, maxjobsize) :
+        """Sets the maximal job size for this print quota entry."""
+        self.MaxJobSize = maxjobsize
+        self.isDirty = True
+
     def delete(self) :
         """Deletes an user print quota entry from the database."""
@@ -380,5 +385,4 @@
         self.HardLimit = None
         self.DateLimit = None
-        self.MaxJobSize = None
 
     def __getattr__(self, name) :
Index: pykota/trunk/pykota/version.py
===================================================================
--- pykota/trunk/pykota/version.py (revision 3547)
+++ pykota/trunk/pykota/version.py (revision 3549)
@@ -24,5 +24,5 @@
 import time
 
-__version__ = "1.27alpha12_unofficial"
+__version__ = "1.27alpha13_unofficial"
 
 __doc__ = "PyKota : a complete Printing Quota Solution for CUPS."
Index: pykota/trunk/cgi-bin/pykotme.cgi
===================================================================
--- pykota/trunk/cgi-bin/pykotme.cgi (revision 3489)
+++ pykota/trunk/cgi-bin/pykotme.cgi (revision 3549)
@@ -182,5 +182,6 @@
                                 upquota = self.storage.getUserPQuota(user, printer)
                                 if upquota.Exists :
-                                    if printer.MaxJobSize and (jobsize > printer.MaxJobSize) :
+                                    if (printer.MaxJobSize and (jobsize > printer.MaxJobSize)) \
+                                            or (upquota.MaxJobSize and (jobsize > upquota.MaxJobSize)) :
                                         msg = _("You are not allowed to print so many pages on printer %s at this time.") % printer.Name
                                     else :
Index: pykota/trunk/bin/edpykota
===================================================================
--- pykota/trunk/bin/edpykota (revision 3489)
+++ pykota/trunk/bin/edpykota (revision 3549)
@@ -36,5 +36,5 @@
 class EdPyKota(PyKotaTool) :
     """A class for edpykota."""
-    def modifyPQEntry(self, pqkey, pqentry, noquota, softlimit, hardlimit, increase, reset, hardreset, suffix, used) :
+    def modifyPQEntry(self, pqkey, pqentry, noquota, softlimit, hardlimit, increase, reset, hardreset, suffix, used, maxjobsize) :
         """Modifies a print quota entry."""
         if noquota or ((softlimit is not None) and (hardlimit is not None)) :
@@ -54,4 +54,9 @@
             if used :
                 pqentry.setUsage(used)
+            if maxjobsize is not None :
+                if maxjobsize == "unlimited" :
+                    pqentry.setMaxJobSize(None)
+                else :
+                    pqentry.setMaxJobSize(maxjobsize)
 
     def main(self, names, options) :
@@ -77,6 +82,8 @@
                                       or options.noquota \
                                       or options.increase \
+                                      or options.maxjobsize \
                                       or options.skipexisting))) \
              or (options.groups and (options.used \
+                                  or options.maxjobsize \
                                   or options.increase \
                                   or options.reset \
@@ -106,5 +113,6 @@
                         self.display("    %s\n" % (_("Hard limit : %s") % pqentry.HardLimit))
                         self.display("    %s\n" % (_("Date limit : %s") % pqentry.DateLimit))
-                        self.display("    %s (Not supported yet)\n" % (_("Maximum job size : %s") % ((pqentry.MaxJobSize and (_("%s pages") % pqentry.MaxJobSize)) or _("Unlimited"))))
+                        if suffix == "User" :
+                            self.display("    %s\n" % (_("Maximum job size : %s") % (((pqentry.MaxJobSize is not None) and (_("%s pages") % pqentry.MaxJobSize)) or _("Unlimited"))))
                         if hasattr(pqentry, "WarnCount") :
                             self.display("    %s\n" % (_("Warning banners printed : %s") % pqentry.WarnCount))
@@ -159,4 +167,17 @@
                         self.printInfo(_("Undefined soft limit set to hard limit (%s).") % str(softlimit))
 
+            if options.maxjobsize :
+                if options.maxjobsize.lower() == "unlimited" :
+                    maxjobsize = "unlimited"
+                else :
+                    try :
+                        maxjobsize = int(options.maxjobsize)
+                        if maxjobsize < 0 :
+                            raise ValueError
+                    except ValueError :
+                        raise PyKotaCommandLineError, _("Invalid maximum job size value %s") % options.maxjobsize
+            else :
+                maxjobsize = None
+
             self.storage.beginTransaction()
             try :
@@ -183,5 +204,6 @@
                                                options.hardreset,
                                                suffix,
-                                               used)
+                                               used,
+                                               maxjobsize)
                             oldpqentry = getattr(self.storage, "add%sPQuota" % suffix)(pqentry)
                             if oldpqentry is not None :
@@ -201,5 +223,6 @@
                                                        options.hardreset,
                                                        suffix,
-                                                       used)
+                                                       used,
+                                                       maxjobsize)
                                     oldpqentry.save()
                             percent.oneMore()
@@ -220,5 +243,6 @@
                                                    options.hardreset,
                                                    suffix,
-                                                   used)
+                                                   used,
+                                                   maxjobsize)
                                 pqentry.save()
                             percent.oneMore()
@@ -263,4 +287,7 @@
                             dest="action",
                             help=_("Display detailed informations about the specified users or groups print quota entries."))
+    parser.add_option("-m", "--maxjobsize",
+                            dest="maxjobsize",
+                            help=_("Set the maximum job size in pages the specified users are allowed to print to the specified printers in a single job. Accepted values are '0' to forbid printing, 'unlimited' to allow unrestricted printing, or any positive integer value. This option is not supported for users groups."))
     parser.add_option("-n", "--noquota",
                             dest="noquota",
Index: pykota/trunk/bin/pykotme
===================================================================
--- pykota/trunk/bin/pykotme (revision 3489)
+++ pykota/trunk/bin/pykotme (revision 3549)
@@ -92,5 +92,6 @@
                 userpquota = self.storage.getUserPQuota(user, printer)
                 if userpquota.Exists :
-                    if printer.MaxJobSize and (totalsize > printer.MaxJobSize) :
+                    if (printer.MaxJobSize and (totalsize > printer.MaxJobSize)) \
+                            or (userpquota.MaxJobSize and (totalsize > userpquota.MaxJobSize)) :
                         self.display("%s\n" % (_("User %(username)s is not allowed to print so many pages on printer %(printername)s at this time.") % locals()))
                     else :
Index: pykota/trunk/bin/pkprinters
===================================================================
--- pykota/trunk/bin/pkprinters (revision 3489)
+++ pykota/trunk/bin/pkprinters (revision 3549)
@@ -50,5 +50,8 @@
             printer.setPassThrough(True)
         if maxjobsize is not None :
-            printer.setMaxJobSize(maxjobsize)
+            if maxjobsize == "unlimited" :
+                printer.setMaxJobSize(None)
+            else :
+                printer.setMaxJobSize(maxjobsize)
 
     def managePrintersGroups(self, pgroups, printer, remove) :
@@ -151,5 +154,5 @@
                                      (_("Passthrough mode : %s") % ((printer.PassThrough and _("ON")) or _("OFF"))))
                 self.display("    %s\n" % \
-                                     (_("Maximum job size : %s") % ((printer.MaxJobSize and (_("%s pages") % printer.MaxJobSize)) or _("Unlimited"))))
+                                     (_("Maximum job size : %s") % (((printer.MaxJobSize is not None) and (_("%s pages") % printer.MaxJobSize)) or _("Unlimited"))))
                 self.display("    %s\n" % (_("Routed through PyKota : %s") % ((self.isPrinterCaptured(printer.Name) and _("YES")) or _("NO"))))
                 if parents :
@@ -188,10 +191,13 @@
 
             if options.maxjobsize :
-                try :
-                    maxjobsize = int(options.maxjobsize)
-                    if maxjobsize < 0 :
-                        raise ValueError
-                except ValueError :
-                    raise PyKotaCommandLineError, _("Invalid maximum job size value %s") % options.maxjobsize
+                if options.maxjobsize.lower() == "unlimited" :
+                    maxjobsize = "unlimited"
+                else :
+                    try :
+                        maxjobsize = int(options.maxjobsize)
+                        if maxjobsize < 0 :
+                            raise ValueError
+                    except ValueError :
+                        raise PyKotaCommandLineError, _("Invalid maximum job size value %s") % options.maxjobsize
             else :
                 maxjobsize = None
@@ -306,5 +312,5 @@
     parser.add_option("-m", "--maxjobsize",
                             dest="maxjobsize",
-                            help=_("Set the maximum job size in pages allowed on the specified printers."))
+                            help=_("Set the maximum job size in pages allowed on the specified printers. Accepted values are '0' to forbid printing, 'unlimited' to allow unrestricted printing, or any positive integer value."))
     parser.add_option("-n", "--nopassthrough",
                             action="store_true",
Index: pykota/trunk/bin/cupspykota
===================================================================
--- pykota/trunk/bin/cupspykota (revision 3545)
+++ pykota/trunk/bin/cupspykota (revision 3549)
@@ -557,4 +557,5 @@
         setenv("PYKOTALIFETIMEPAID", str(self.User.LifeTimePaid or 0.0), self.charset)
         setenv("PYKOTAUSERDESCRIPTION", self.User.Description or "", self.charset)
+        setenv("PYKOTAMAXJOBSIZE", ((self.UserPQuota.MaxJobSize is None) and _("Unlimited")) or str(self.UserPQuota.MaxJobSize), self.charset)
 
         setenv("PYKOTAPAGECOUNTER", str(self.UserPQuota.PageCounter or 0), self.charset)
@@ -1027,4 +1028,13 @@
                 # This printer was set to refuse jobs this large.
                 self.printInfo(_("Precomputed job size (%s pages) too large for printer %s.") % (self.softwareJobSize, self.PrinterName), "warn")
+                self.Action = "DENY"
+                # here we don't put the precomputed job size in the message
+                # because in case of error the user could complain :-)
+                self.Reason = _("You are not allowed to print so many pages on printer %s at this time.") % self.PrinterName
+
+        if self.Action not in ("DENY", "CANCEL") :
+            if (self.UserPQuota.MaxJobSize is not None) and (self.softwareJobSize > self.UserPQuota.MaxJobSize) :
+                # This user print quota entry was set to refuse jobs this large.
+                self.printInfo(_("Precomputed job size (%s pages) too large for user %s on printer %s.") % (self.softwareJobSize, self.UserName, self.PrinterName), "warn")
                 self.Action = "DENY"
                 # here we don't put the precomputed job size in the message
Index: pykota/trunk/initscripts/ldap/pykota.schema
===================================================================
--- pykota/trunk/initscripts/ldap/pykota.schema (revision 3481)
+++ pykota/trunk/initscripts/ldap/pykota.schema (revision 3549)
@@ -5,5 +5,5 @@
 # LDAP Schema for Pykota Quota System
 #
-# (c) 2003-2009 Jerome Alet <alet@librelogiciel.com>
+# (c) 2003-2010 Jerome Alet <alet@librelogiciel.com>
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -293,4 +293,7 @@
 
 # pykotaGroupPQuota
+# NB : we still allow pykotaMaxJobSize here but
+# only to not break existing LDAP directories.
+# This attribute is not supported for users groups.
 objectclass ( 1.3.6.1.4.1.16868.1.2.5 NAME 'pykotaGroupPQuota' SUP top AUXILIARY
         DESC 'PyKota Group Quota on a Printer'
Index: pykota/trunk/initscripts/sqlite/pykota-sqlite.sql
===================================================================
--- pykota/trunk/initscripts/sqlite/pykota-sqlite.sql (revision 3481)
+++ pykota/trunk/initscripts/sqlite/pykota-sqlite.sql (revision 3549)
@@ -112,5 +112,4 @@
                          softlimit INT4,
                          hardlimit INT4,
-                         maxjobsize INT4,
                          datelimit TEXT);
 CREATE INDEX grouppquota_g_id_ix ON grouppquota (groupid);
Index: pykota/trunk/initscripts/postgresql/pykota-postgresql.sql
===================================================================
--- pykota/trunk/initscripts/postgresql/pykota-postgresql.sql (revision 3481)
+++ pykota/trunk/initscripts/postgresql/pykota-postgresql.sql (revision 3549)
@@ -129,5 +129,4 @@
                          softlimit INT4,
                          hardlimit INT4,
-                         maxjobsize INT4,
                          datelimit TIMESTAMP);
 CREATE INDEX grouppquota_g_id_ix ON grouppquota (groupid);
Index: pykota/trunk/initscripts/postgresql/upgrade-to-1.27.sql
===================================================================
--- pykota/trunk/initscripts/postgresql/upgrade-to-1.27.sql (revision 3549)
+++ pykota/trunk/initscripts/postgresql/upgrade-to-1.27.sql (revision 3549)
@@ -0,0 +1,41 @@
+--
+-- PyKota - Print Quotas for CUPS
+--
+-- (c) 2003-2010 Jerome Alet <alet@librelogiciel.com>
+-- This program is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
+--
+-- $Id$
+--
+--
+--
+-- This script has to be used if you already
+-- have a pre-1.27alpha13 version of PyKota to upgrade
+-- your database schema.
+--
+-- YOU DON'T NEED TO USE IT IF YOU'VE JUST INSTALLED PYKOTA
+--
+
+--
+-- Modify the old database schema
+--
+ALTER TABLE grouppquota DROP COLUMN maxjobsize;
+
+--
+-- Now updates existing datas
+--
+-- Just to be sure
+BEGIN;
+UPDATE printers SET maxjobsize=NULL WHERE maxjobsize=0;
+COMMIT;
+
Index: pykota/trunk/initscripts/mysql/pykota-mysql.sql
===================================================================
--- pykota/trunk/initscripts/mysql/pykota-mysql.sql (revision 3481)
+++ pykota/trunk/initscripts/mysql/pykota-mysql.sql (revision 3549)
@@ -141,5 +141,4 @@
                          softlimit INT4,
                          hardlimit INT4,
-                         maxjobsize INT4,
                          datelimit DATETIME,
                          INDEX (groupid),
