Summary: | Show more information about rotating collections | ||
---|---|---|---|
Product: | Koha | Reporter: | Josef Moravec <josef.moravec> |
Component: | Tools | Assignee: | Josef Moravec <josef.moravec> |
Status: | BLOCKED --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | black23, marjorie.barry-vila |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 19519 | ||
Bug Blocks: | |||
Attachments: |
Bug 19520: Update database
Bug 19520: Update databse schema files Bug 19520: Add tests Bug 19520: Add more information about rotating collections Bug 19520: Update database Bug 19520: Update databse schema files Bug 19520: Add tests Bug 19520: Add more information about rotating collections Bug 19520: Update database Bug 19520: Update databse schema files Bug 19520: Add tests Bug 19520: Add more information about rotating collections |
Description
Josef Moravec
2017-10-23 19:01:01 UTC
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 |