Changeset 900 for pykota/trunk/initscripts
- Timestamp:
- 04/10/03 23:47:20 (21 years ago)
- Location:
- pykota/trunk/initscripts
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/initscripts/pykota-postgresql.sql
r897 r900 20 20 -- 21 21 -- $Log$ 22 -- Revision 1.10 2003/04/10 21:47:20 jalet 23 -- Job history added. Upgrade script neutralized for now ! 24 -- 22 25 -- Revision 1.9 2003/04/09 20:11:29 jalet 23 26 -- Added a field to save the action taken for this job (Allow, Deny) … … 93 96 -- 94 97 CREATE 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); 99 99 100 100 -- … … 111 111 112 112 -- 113 -- Create the job history table for u113 -- Create the job history table 114 114 -- 115 115 CREATE TABLE jobhistory(id SERIAL PRIMARY KEY NOT NULL, … … 117 117 userid INT4 REFERENCES users(id), 118 118 printerid INT4 REFERENCES printers(id), 119 pagecounter INT4 DEFAULT 0, 120 jobsize INT4, 119 121 action TEXT, 120 jobsize INT4,121 122 jobdate TIMESTAMP DEFAULT now()); 122 123 … … 145 146 GRANT SELECT, UPDATE ON users_id_seq, groups_id_seq, printers_id_seq, userpquota_id_seq, grouppquota_id_seq, jobhistory_id_seq TO pykotaadmin; 146 147 GRANT SELECT, UPDATE ON printers, userpquota, grouppquota TO pykotauser; 147 GRANT SELECT ON users, groups, groupsmembers, jobhistory TO pykotauser; 148 GRANT SELECT ON users, groups, groupsmembers TO pykotauser; 149 GRANT SELECT, INSERT, UPDATE ON jobhistory TO pykotauser; 150 GRANT SELECT, UPDATE ON jobhistory_id_seq TO pykotauser; 148 151 -
pykota/trunk/initscripts/README.postgresql
r887 r900 93 93 1.03, YOU HAVE TO RUN the upgrade-1.01-to-1.03.sh shell script. 94 94 NOT LAUNCHING THIS SCRIPT WILL CAUSE PYKOTA TO STOP WORKING ! 95 Please don't run this script if your version of PyKota is already96 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 5 5 echo WARNING : If unsure press Ctrl+C NOW TO STOP, else press ENTER TO PROCEED 6 6 read 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 8 echo This script does not work at all yet ! 9 echo Please be patient so that I can write a safe upgrade script 10 echo of completely drop your existing database to start anew 11 echo 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