Bug 11006

Summary: Useless column totalamount in aqorders table
Product: Koha Reporter: Mathieu Saby <mathsabypro>
Component: DatabaseAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: jonathan.druart, tomascohen, veron
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:
Attachments: Bug 11006: Drop column aqorders.totalamount
[Signed-off] Bug 11006: Drop column aqorders.totalamount
[PASSED QA] Bug 11006: Drop column aqorders.totalamount
Bug 11006: (RM followup) DBIx updates

Description Mathieu Saby 2013-10-07 15:22:35 UTC
In Schemaspy, column totalamount is reported as "not used? always NULL".
"grep -r totalamount *" give this result, so I suppose it is true : 

blib/INTRANET_CGI_DIR/installer/data/mysql/kohastructure.sql:  `totalamount` decimal(28,6) default NULL, -- not used? always NULL
blib/INTRANET_CGI_DIR/installer/data/Pg/kohastructure.sql:totalamount decimal(28,6) default NULL,
installer/data/mysql/kohastructure.sql:  `totalamount` decimal(28,6) default NULL, -- not used? always NULL
installer/data/Pg/kohastructure.sql:totalamount decimal(28,6) default NULL,
t/db_dependent/Acquisition.t:                         totalamount

I propose the deletion of this column.

M. Saby
Comment 1 Jonathan Druart 2015-04-22 11:06:13 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2015-04-23 07:19:03 UTC
# git grep totalamount
Koha/Schema/Result/Aqorder.pm:=head2 totalamount
Koha/Schema/Result/Aqorder.pm:  "totalamount",

Should that still appear?
Comment 3 Jonathan Druart 2015-04-23 07:49:20 UTC
(In reply to Marc Véron from comment #2)
> # git grep totalamount
> Koha/Schema/Result/Aqorder.pm:=head2 totalamount
> Koha/Schema/Result/Aqorder.pm:  "totalamount",
> 
> Should that still appear?

Yes, I don't update the schema when not needed to test.
The RM uploads it when needed.
Comment 4 Marc Véron 2015-04-23 07:57:01 UTC Comment hidden (obsolete)
Comment 5 Kyle M Hall (khall) 2015-04-23 11:27:16 UTC
Created attachment 38402 [details] [review]
[PASSED QA] Bug 11006: Drop column aqorders.totalamount

This column was not used in the Koha codebase, it can be removed.

Test plan:
Execute the updatedatabase.pl script and confirm that the column has
been dropped.

QA step:
1/ git grep totalamount
2/ prove t/db_dependent/Acquisition.t

Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 6 Tomás Cohen Arazi (tcohen) 2015-05-14 14:21:12 UTC
Patch pushed to master.

Thanks Jonathan!

tatus: Pushed to Master
Comment 7 Tomás Cohen Arazi (tcohen) 2015-05-14 14:31:04 UTC
Created attachment 39186 [details] [review]
Bug 11006: (RM followup) DBIx updates

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>