Bug 11006 - Useless column totalamount in aqorders table
Summary: Useless column totalamount in aqorders table
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Database (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-07 15:22 UTC by Mathieu Saby
Modified: 2015-12-03 22:11 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 11006: Drop column aqorders.totalamount (2.49 KB, patch)
2015-04-22 11:06 UTC, Jonathan Druart
Details | Diff | Splinter Review
[Signed-off] Bug 11006: Drop column aqorders.totalamount (2.64 KB, patch)
2015-04-23 07:57 UTC, Marc Véron
Details | Diff | Splinter Review
[PASSED QA] Bug 11006: Drop column aqorders.totalamount (2.56 KB, patch)
2015-04-23 11:27 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11006: (RM followup) DBIx updates (1.66 KB, patch)
2015-05-14 14:31 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 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 2015-05-14 14:21:12 UTC
Patch pushed to master.

Thanks Jonathan!

tatus: Pushed to Master
Comment 7 Tomás Cohen Arazi 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>