Changeset 1240 for pykota/trunk/initscripts
- Timestamp:
- 12/27/03 17:49:25 (21 years ago)
- Location:
- pykota/trunk/initscripts
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/initscripts/ldap/pykota.schema
r1223 r1240 189 189 DESC 'PyKota Printer' 190 190 MUST ( cn ) 191 MAY ( pykotaPrinterName $ pykotaPricePerPage $ pykotaPricePerJob ) )191 MAY ( pykotaPrinterName $ pykotaPricePerPage $ pykotaPricePerJob $ uniqueMember ) ) 192 192 193 193 # pykotaUserPQuota -
pykota/trunk/initscripts/postgresql/pykota-postgresql.sql
r1203 r1240 20 20 -- 21 21 -- $Log$ 22 -- Revision 1.7 2003/12/27 16:49:25 uid67467 23 -- Should be ok now. 24 -- 22 25 -- Revision 1.6 2003/11/23 19:01:36 jalet 23 26 -- Job price added to history … … 110 113 CREATE TABLE jobhistory(id SERIAL PRIMARY KEY NOT NULL, 111 114 jobid TEXT, 112 userid INT4 REFERENCES users(id),113 printerid INT4 REFERENCES printers(id),115 userid INT4, 116 printerid INT4, 114 117 pagecounter INT4 DEFAULT 0, 115 118 jobsize INT4, … … 120 123 copies INT4, 121 124 options TEXT, 122 jobdate TIMESTAMP DEFAULT now()); 125 jobdate TIMESTAMP DEFAULT now(), 126 CONSTRAINT checkUserPQuota FOREIGN KEY (userid, printerid) REFERENCES userpquota(userid, printerid)); 123 127 CREATE INDEX jobhistory_p_id_ix ON jobhistory (printerid); 124 128 CREATE INDEX jobhistory_pd_id_ix ON jobhistory (printerid, jobdate); … … 141 145 userid INT4 REFERENCES users(id), 142 146 PRIMARY KEY (groupid, userid)); 147 148 -- 149 -- Create the printer groups relationship 150 -- 151 CREATE TABLE printergroupsmembers(groupid INT4 REFERENCES printers(id), 152 printerid INT4 REFERENCES printers(id), 153 PRIMARY KEY (groupid, printerid)); 143 154 144 155 -- 145 156 -- Set some ACLs 146 157 -- 147 REVOKE ALL ON users, groups, printers, userpquota, grouppquota, groupsmembers, jobhistory FROM public;158 REVOKE ALL ON users, groups, printers, userpquota, grouppquota, groupsmembers, printergroupsmembers, jobhistory FROM public; 148 159 REVOKE ALL ON users_id_seq, groups_id_seq, printers_id_seq, userpquota_id_seq, grouppquota_id_seq, jobhistory_id_seq FROM public; 149 160 150 GRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES ON users, groups, printers, userpquota, grouppquota, groupsmembers, jobhistory TO pykotaadmin;161 GRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES ON users, groups, printers, userpquota, grouppquota, groupsmembers, printergroupsmembers, jobhistory TO pykotaadmin; 151 162 GRANT SELECT, UPDATE ON users_id_seq, groups_id_seq, printers_id_seq, userpquota_id_seq, grouppquota_id_seq, jobhistory_id_seq TO pykotaadmin; 152 GRANT SELECT ON users, groups, printers, userpquota, grouppquota, groupsmembers, jobhistory TO pykotauser;163 GRANT SELECT ON users, groups, printers, userpquota, grouppquota, groupsmembers, printergroupsmembers, jobhistory TO pykotauser; 153 164 -
pykota/trunk/initscripts/postgresql/upgrade-to-1.16.sql
r1203 r1240 20 20 -- 21 21 -- $Log$ 22 -- Revision 1.3 2003/12/27 16:49:25 uid67467 23 -- Should be ok now. 24 -- 22 25 -- Revision 1.2 2003/11/23 19:01:36 jalet 23 26 -- Job price added to history … … 48 51 ALTER TABLE jobhistory ADD COLUMN options TEXT; 49 52 53 -- 54 -- Remove bad integrity rules 55 -- and replace them with a new one 56 -- 57 ALTER TABLE jobhistory DROP CONSTRAINT "$1"; 58 ALTER TABLE jobhistory DROP CONSTRAINT "$2"; 59 ALTER TABLE jobhistory ADD CONSTRAINT checkUserPQuota FOREIGN KEY (userid, printerid) REFERENCES userpquota (userid, printerid); 60 61 -- 62 -- Add new tables 63 -- 64 -- 65 -- Create the printer groups relationship 66 -- 67 CREATE TABLE printergroupsmembers(groupid INT4 REFERENCES printers(id), 68 printerid INT4 REFERENCES printers(id), 69 PRIMARY KEY (groupid, printerid)); 70 50 71 -- 51 72 -- Now add some indexes … … 56 77 CREATE UNIQUE INDEX grouppquota_up_id_ix ON grouppquota (groupid, printerid); 57 78 79 -- 80 -- And now sets some ACLs 81 -- 82 REVOKE ALL ON printergroupsmembers FROM public; 83 GRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES ON printergroupsmembers TO pykotaadmin; 84 GRANT SELECT ON printergroupsmembers TO pykotauser; 85