# $Id$ PyKota - Print Quota for CUPS and LPRng (c) 2003-2004 Jerome Alet 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 2 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, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ============================================================ Documentation for the pykota-postgresql.sql script : ---------------------------------------------------- This script is to be used to create an empty Quota Storage DataBase using PostgreSQL as a backend. If you have already installed PyKota, and have datas in your Quota Storage DataBase, you may prefer to skip this section and read the next one. - Launch the psql frontend and connect to the database template1 as a PostgreSQL administrator (i.e. the postgres user) : $ psql -h localhost -U postgres template1 - Executes the pykota-postgresql.sql script : template1=# \i pykota-postgresql.sql - Quit the psql frontend : template1=# \q - Your PostgreSQL PyKota storage is now ready for use. ============================================================ 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 of them or only some of them, depending on your version of PyKota. * An SQL script to upgrade a 1.18 PyKota Storage DataBase to 1.19 is included. Launch it this way on the Quota Storage Server : $ psql -U postgres pykota pykota=# \i upgrade-to-1.19.sql pykota=# \q $ This script adds a field to the print job history. The field that is added is : hostname * 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 : jobprice, 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 : $ psql -U postgres pykota pykota=# \i upgrade-to-1.14.sql pykota=# \q $ This script adds an "email" field for each user. This field, if not NULL, is used as the email address of the user when sending warning messages in case he is over quota. * 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 ! * If you are already running an old version of PyKota (<1.03) and want to upgrade to 1.03, YOU HAVE TO RUN the upgrade-from-before-1.03.py shell script. NOT LAUNCHING THIS SCRIPT WILL CAUSE PYKOTA TO STOP WORKING ! PLEASE NEVER RUN THIS SCRIPT IF YOUR EXISTING VERSION OF PYKOTA IS ALREADY 1.03 OR HIGHER.