Show
Ignore:
Timestamp:
04/10/03 23:47:20 (21 years ago)
Author:
jalet
Message:

Job history added. Upgrade script neutralized for now !

Location:
pykota/trunk/initscripts
Files:
3 modified

Legend:

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

    r897 r900  
    2020-- 
    2121-- $Log$ 
     22-- Revision 1.10  2003/04/10 21:47:20  jalet 
     23-- Job history added. Upgrade script neutralized for now ! 
     24-- 
    2225-- Revision 1.9  2003/04/09 20:11:29  jalet 
    2326-- Added a field to save the action taken for this job (Allow, Deny) 
     
    9396-- 
    9497CREATE TABLE printers(id SERIAL PRIMARY KEY NOT NULL, 
    95                       printername TEXT UNIQUE NOT NULL, 
    96                       lastjobid TEXT, 
    97                       lastusername TEXT, 
    98                       pagecounter INT4 DEFAULT 0); 
     98                      printername TEXT UNIQUE NOT NULL); 
    9999                     
    100100-- 
     
    111111                         
    112112-- 
    113 -- Create the job history table for u 
     113-- Create the job history table 
    114114-- 
    115115CREATE TABLE jobhistory(id SERIAL PRIMARY KEY NOT NULL, 
     
    117117                        userid INT4 REFERENCES users(id), 
    118118                        printerid INT4 REFERENCES printers(id), 
     119                        pagecounter INT4 DEFAULT 0, 
     120                        jobsize INT4, 
    119121                        action TEXT, 
    120                         jobsize INT4, 
    121122                        jobdate TIMESTAMP DEFAULT now()); 
    122123                         
     
    145146GRANT SELECT, UPDATE ON users_id_seq, groups_id_seq, printers_id_seq, userpquota_id_seq, grouppquota_id_seq, jobhistory_id_seq TO pykotaadmin; 
    146147GRANT SELECT, UPDATE ON printers, userpquota, grouppquota TO pykotauser; 
    147 GRANT SELECT ON users, groups, groupsmembers, jobhistory TO pykotauser; 
     148GRANT SELECT ON users, groups, groupsmembers TO pykotauser; 
     149GRANT SELECT, INSERT, UPDATE ON jobhistory TO pykotauser; 
     150GRANT SELECT, UPDATE ON jobhistory_id_seq TO pykotauser; 
    148151 
  • pykota/trunk/initscripts/README.postgresql

    r887 r900  
    9393  1.03, YOU HAVE TO RUN the upgrade-1.01-to-1.03.sh shell script. 
    9494  NOT LAUNCHING THIS SCRIPT WILL CAUSE PYKOTA TO STOP WORKING ! 
    95   Please don't run this script if your version of PyKota is already 
    96   1.03 or higher. 
     95  Please don't run this script if your existing version of PyKota is  
     96  already 1.03 or higher. 
  • pykota/trunk/initscripts/upgrade-1.01-to-1.03.sh

    r888 r900  
    55echo WARNING : If unsure press Ctrl+C NOW TO STOP, else press ENTER TO PROCEED 
    66read 
    7 echo -n Update begins... 
    8 pg_dump -D -N -U postgres -f pykotadb-full.dump pykota >update.messages 2>update.errors 
    9 pg_dump -a -D -N -U postgres -f pykotadb.dump pykota >>update.messages 2>>update.errors 
    10 dropdb pykota >>update.messages 2>>update.errors 
    11 dropuser pykotaadmin >>update.messages 2>>update.errors 
    12 dropuser pykotauser >>update.messages 2>>update.errors 
    13 psql -U postgres template1 -f pykota-postgresql.sql >>update.messages 2>>update.errors 
    14 psql -U postgres pykota -f pykotadb.dump >>update.messages 2>>update.errors 
    15 echo 
    16 echo Done ! 
    17 echo Check the files update.messages and update.errors to see if all is OK. 
    18 echo NOTICE messages are normal and expected. In case other message types 
    19 echo are found in update.errors, please file a bug report and restore 
    20 echo your database from pykotadb-full.dump 
     7 
     8echo This script does not work at all yet ! 
     9echo Please be patient so that I can write a safe upgrade script 
     10echo of completely drop your existing database to start anew 
     11echo with this version of PyKota. 
     12 
     13#echo -n Update begins... 
     14#pg_dump -D -N -U postgres -f pykotadb-full.dump pykota >upgrade.messages 2>upgrade.errors 
     15#pg_dump -a -D -N -U postgres -f pykotadb.dump pykota >>upgrade.messages 2>>upgrade.errors 
     16#dropdb pykota >>upgrade.messages 2>>upgrade.errors 
     17#dropuser pykotaadmin >>upgrade.messages 2>>upgrade.errors 
     18#dropuser pykotauser >>upgrade.messages 2>>upgrade.errors 
     19#psql -U postgres template1 -f pykota-postgresql.sql >>upgrade.messages 2>>upgrade.errors 
     20#psql -U postgres pykota -f pykotadb.dump >>upgrade.messages 2>>upgrade.errors 
     21#echo 
     22#echo Done ! 
     23#echo Check the files upgrade.messages and upgrade.errors to see if all is OK. 
     24#echo NOTICE messages are normal and expected. In case other message types 
     25#echo are found in upgrade.errors, please file a bug report and restore 
     26#echo your database from pykotadb-full.dump