On colections list and detail: - Number of items in collection - Number of transferred/untransferred items - Librarian who created the collection - Date of creation - Date of last transfer
Created attachment 72819 [details] [review] Bug 19520: Update database
Created attachment 72820 [details] [review] Bug 19520: Update databse schema files
Created attachment 72821 [details] [review] Bug 19520: Add tests
Created attachment 72822 [details] [review] Bug 19520: Add more information about rotating collections Test plan: 1) Apply the patch 2) Update database 3) ) prove t/db_dependent/Koha/RotatingCollections.t
Comment on attachment 72819 [details] [review] Bug 19520: Update database Review of attachment 72819 [details] [review]: ----------------------------------------------------------------- ::: installer/data/mysql/atomicupdate/Bug19520_Add_more_information_to_rotating_collections.perl @@ +5,5 @@ > + $dbh->do( "ALTER TABLE collections ADD CONSTRAINT `collections_ibfk_2` FOREIGN KEY (`createdBy`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE"); > + > + $dbh->do( "ALTER TABLE collections ADD COLUMN createdOn datetime default NULL AFTER createdBy" ); > + > + $dbh->do( "ALTER TABLE collections ADD COLUMN lastTransferredOn datetime default NULL AFTER createdOn" ); These 4 do's should be encapsulated by !column_exists checks. @@ +10,5 @@ > + > + # or perform some test and warn > + # if( !column_exists( 'biblio', 'biblionumber' ) ) { > + # warn "There is something wrong"; > + # } And you don't need comments. :)
Created attachment 73260 [details] [review] Bug 19520: Update database
Created attachment 73261 [details] [review] Bug 19520: Update databse schema files
Created attachment 73262 [details] [review] Bug 19520: Add tests
Created attachment 73263 [details] [review] Bug 19520: Add more information about rotating collections Test plan: 1) Apply the patch 2) Update database 3) prove t/db_dependent/Koha/RotatingCollections.t
(In reply to M. Tompsett from comment #5) > Comment on attachment 72819 [details] [review] [review] > Bug 19520: Update database > > Review of attachment 72819 [details] [review] [review]: > ----------------------------------------------------------------- > > ::: > installer/data/mysql/atomicupdate/ > Bug19520_Add_more_information_to_rotating_collections.perl > @@ +5,5 @@ > > + $dbh->do( "ALTER TABLE collections ADD CONSTRAINT `collections_ibfk_2` FOREIGN KEY (`createdBy`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE"); > > + > > + $dbh->do( "ALTER TABLE collections ADD COLUMN createdOn datetime default NULL AFTER createdBy" ); > > + > > + $dbh->do( "ALTER TABLE collections ADD COLUMN lastTransferredOn datetime default NULL AFTER createdOn" ); > > These 4 do's should be encapsulated by !column_exists checks. > > @@ +10,5 @@ > > + > > + # or perform some test and warn > > + # if( !column_exists( 'biblio', 'biblionumber' ) ) { > > + # warn "There is something wrong"; > > + # } > > And you don't need comments. :) Done, thanks ;)
Created attachment 73394 [details] [review] Bug 19520: Update database
Created attachment 73395 [details] [review] Bug 19520: Update databse schema files
Created attachment 73396 [details] [review] Bug 19520: Add tests
Created attachment 73397 [details] [review] Bug 19520: Add more information about rotating collections Test plan: 1) Apply the patch 2) Update database 3) prove t/db_dependent/Koha/RotatingCollections.t
Josef, can You rebase this bug? Thank You Mike