Changeset 765 for pykota/trunk

Show
Ignore:
Timestamp:
02/08/03 23:12:09 (22 years ago)
Author:
jalet
Message:

Life time counter for users and groups added.

Location:
pykota/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/initscripts/pykota-postgresql.sql

    r695 r765  
    1414-- 
    1515-- $Log$ 
     16-- Revision 1.2  2003/02/08 22:12:09  jalet 
     17-- Life time counter for users and groups added. 
     18-- 
    1619-- Revision 1.1  2003/02/05 21:28:17  jalet 
    1720-- Initial import into CVS 
     
    6972                        userid INT4 REFERENCES users(id), 
    7073                        printerid INT4 REFERENCES printers(id), 
     74                        lifepagecounter INT4 DEFAULT 0, 
    7175                        pagecounter INT4 DEFAULT 0, 
    7276                        softlimit INT4, 
     
    8084                         groupid INT4 REFERENCES groups(id), 
    8185                         printerid INT4 REFERENCES printers(id), 
     86                         lifepagecounter INT4 DEFAULT 0, 
    8287                         pagecounter INT4 DEFAULT 0, 
    8388                         softlimit INT4, 
  • pykota/trunk/pykota/storages/sql.py

    r748 r765  
    1515# 
    1616# $Log$ 
     17# Revision 1.15  2003/02/08 22:12:09  jalet 
     18# Life time counter for users and groups added. 
     19# 
    1720# Revision 1.14  2003/02/07 22:13:13  jalet 
    1821# Perhaps edpykota is now able to add printers !!! Oh, stupid me ! 
     
    171174        (userid, printerid) = self.getUPIds(username, printername) 
    172175        if (userid is not None) and (printerid is not None) : 
    173             self.doQuery("UPDATE userpquota SET pagecounter=pagecounter+(%s) WHERE userid=%s AND printerid=%s;" % (self.doQuote(pagecount), self.doQuote(userid), self.doQuote(printerid))) 
     176            self.doQuery("UPDATE userpquota SET lifepagecounter=lifepagecounter+(%s), pagecounter=pagecounter+(%s) WHERE userid=%s AND printerid=%s;" % (self.doQuote(pagecount), self.doQuote(pagecount), self.doQuote(userid), self.doQuote(printerid))) 
    174177         
    175178    def buyUserPQuota(self, username, printername, pagebought) :